Posted 12 September 2017, 1:28 am EST
Hi community,
I want to present a sample which copies a range of selected cells to clipboard using the HTML format. This way, the cell content can be pasted to microsoft excel/word/outlook and the formatting is kept.
Features:
-
"
-
“The sample code copies also the row/column headers for the selected cells.”
-
“Supported cell style formatting: forecolor, backcolor, font (font family and font size are only applied if the are not the C1FlexGrid Defaults)”
-
“merged ranges are supported”
-
“borders - but just basic support…”
-
“column widths - but see below for limitations”
-
“all cell data is copied as string (cell format is set to “@” - relevant for excel paste)”
"
Limitations:
- "
- “when pasting to Excel, the column widths are ignored. I did not find a way to apply them… Outlook and Word work.”
"
The HTML clipboard format is described here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms649015(v=vs.85).aspx
Hope someone finds this helpful
Wolfgang