Excel export
The Excel export produces an .xlsx workbook from a List & Label report project using the OpenXML format. It is provided by the combit.ListLabel31.CrossPlatform.Export.OpenXml package and selected with LlExportTarget.Xlsx.
The exporter targets two distinct scenarios:
- A fully formatted workbook that mirrors the rendered report layout, including page headers, footers, fonts, colors, and cell borders.
- A data-only workbook that contains only the values from table objects, intended for further processing in Excel or downstream tools.
The active scenario is controlled by ExportOnlyTableData. Many of the other options below only take effect in the data-only scenario; this is called out per option.
Note
The OpenXML package must be installed for XLSX export to be available at runtime. See Installing export packages.
Supported export options
All options are set on ExportConfiguration.ExportOptions using the LlExportOption keys listed below. Values are always strings.
ExportOnlyTableData
Selects between a fully formatted export and a data-only export.
| Value | Meaning |
|---|---|
"0" |
Default. Export with full formatting; the workbook mirrors the rendered report. |
"1" |
Export only the textual content of table cells. Of the cell font, only bold and italic are preserved. |
Several options below are only evaluated when ExportOnlyTableData is set to "1".
XlsAllPagesOneSheet
Controls how rendered pages are mapped to worksheets.
| Value | Meaning |
|---|---|
"0" |
Each rendered page is placed on its own worksheet. |
"1" |
Default. All pages are placed below each other on a single worksheet. |
XlsIgnoreGroupLines
Only relevant when ExportOnlyTableData is "1". Controls whether group header and footer lines are exported.
| Value | Meaning |
|---|---|
"0" |
Default. Group header and footer lines are not exported. |
"1" |
Group header and footer lines are exported. |
XlsIgnoreHeaderFooterLines
Only relevant when ExportOnlyTableData is "1". Controls how table header and footer lines are exported. Does not affect group header/footer lines (see XlsIgnoreGroupLines).
| Value | Meaning |
|---|---|
"0" |
All header and footer lines are exported. |
"1" |
Default. No header or footer lines are exported. |
"2" |
Only the first occurrence of the header and footer is exported. |
ExportInfinitePage
Disables page breaks during rendering.
| Value | Meaning |
|---|---|
"0" |
Default. Pages are broken according to the project's page size. |
"1" |
The report is rendered as a single, very tall page. |
Warning
The infinite page is internally limited to 7200 pages worth of content.
XlsFontScalingPercentage
Scales all fonts by the given percentage. Excel typically renders text slightly taller than LLCP's reference rendering, so a small scale-down keeps cell content within the original layout.
- Value: a percentage (for example
"95"for 0.95×). - Default:
"95".
XlsPrintingZoom
Sets the print zoom written into the workbook. This compensates for the fact that the non-printable margin area cannot be used in Excel and would otherwise cause objects to fall off the printable page.
- Value: an integer percentage (for example
"95"). - Default:
"95".
XlsIgnoreLineWrapForDataOnlyExport
Only relevant when ExportOnlyTableData is "1".
| Value | Meaning |
|---|---|
"0" |
Default. Line breaks inside cells are preserved. |
"1" |
Line breaks inside cells are replaced with spaces. |
XlsWorksheetName
Sets the name applied to the exported worksheets. The same value is used for every sheet. If the placeholder %d appears in the value, it is replaced with the page or worksheet number (for example "Report container %d" produces "Report container 1", "Report container 2", ...).
XlsShowGridlines
Controls whether Excel's worksheet gridlines are visible.
| Value | Meaning |
|---|---|
"0" |
Gridlines are hidden. |
"1" |
Default. Gridlines are visible. |
XlsConvertNumeric
Controls whether textual values that look like numbers are stored as numeric cells.
| Value | Meaning |
|---|---|
"0" |
No conversion; everything is stored as text. |
"1" |
Texts are checked against a numeric heuristic and stored with the number of decimals defined in the project settings. |
"3" |
Default. Cell formatting is taken from the project's Format setting. Texts without an explicit format are stored as numbers if they match the numeric heuristic. |
Note
The value "2" from the classic exporter (convert only columns that actually contain a numeric value) is not supported.
XlsAutoFormula
Controls whether texts starting with = are written as Excel formulas.
| Value | Meaning |
|---|---|
"0" |
Default. Texts are stored as plain text, including the leading =. |
"1" |
Texts starting with = are stored as formulas. |
XlsAutoFit
Only relevant when ExportOnlyTableData is "1". Controls how column widths are determined.
| Value | Meaning |
|---|---|
"0" |
Columns use Excel's default width. |
"1" |
Default. Column width follows the longest TableFieldText in the column. TableFieldRtf cells continue to wrap when they exceed the column width. |
XlsHeaderContent and XlsFooterContent
Set the content of the Excel page header and footer. Each region (left, center, right) accepts up to 255 characters and supports the standard Excel header/footer format codes:
| Code | Effect |
|---|---|
&L |
Following text is shown left-aligned. |
&C |
Following text is shown centered. |
&R |
Following text is shown right-aligned. |
&P |
Current page number. |
&N |
Total number of pages. |
&D |
Current date. |
&T |
Current time. |
&Z |
File path of the workbook. |
&F |
File name of the workbook. |
&A |
Worksheet name. |
&B |
Following text is bold. |
&I |
Following text is italic. |
&U |
Following text is underlined. |
&E |
Following text is double-underlined. |
&S |
Following text is struck through. |
&X |
Following text is superscript. |
&Y |
Following text is subscript. |
&"fontname" |
Following text uses the specified font. |
&<size> |
Font size for the following text (1–3 digits, for example &9 or &36). |
&& |
A literal & character. |
XlsHeaderMargin and XlsFooterMargin
Distance of the page header from the top and the page footer from the bottom, expressed in inches.
- Value: a decimal number (for example
"0.5"). - Maximum:
5.7. - Default:
"0".
XlsProtectionProtectSheets
Enables sheet protection. This option is the master switch — the password and mode options below have no effect unless protection is enabled.
| Value | Meaning |
|---|---|
"0" |
Default. No sheet protection. |
"1" |
Sheet protection is enabled. |
XlsProtectionProtectSheetsPassword
Sets the password used to protect the worksheets. Only evaluated when XlsProtectionProtectSheets is "1".
Warning
The password must be ASCII and is limited to 15 characters. Unicode characters are not supported.
XlsProtectionProtectSheetsMode
Selects which actions remain allowed on a protected sheet. The value is a flag combination: combine the desired flags with bitwise OR, cast the result to an integer, and store it as a string.
| Value | Flag | Meaning |
|---|---|---|
-1 |
Default |
Default. Excel's default protection: every modification is blocked, but cells can still be selected. |
0 |
None |
Same as Default, but the disallowed actions are written explicitly into the SheetProtection element. |
1 |
ObjectsLocked |
Shapes (rectangles, ellipses, lines, images) cannot be added, edited, or deleted. |
2 |
ScenariosLocked |
Scenarios cannot be added, edited, or deleted. |
4 |
AllowFormatCells |
Cells may be formatted. |
8 |
AllowFormatColumns |
Whole columns may be formatted. |
16 |
AllowFormatRows |
Whole rows may be formatted. |
32 |
AllowInsertColumns |
Columns may be inserted. |
64 |
AllowInsertRows |
Rows may be inserted. |
128 |
AllowInsertHyperlinks |
Hyperlinks may be inserted. |
256 |
AllowDeleteColumns |
Whole columns may be deleted. |
512 |
AllowDeleteRows |
Whole rows may be deleted. |
1024 |
LockSelectionLockedCells |
Cells that are not editable cannot be selected (note: with this flag set there are no such cells). |
2048 |
AllowSort |
Data may be sorted. |
4096 |
AllowAutoFilter |
Data may be filtered. |
8192 |
AllowPivotTables |
Pivot tables may be used and edited. |
16384 |
LockSelectionUnlockedCells |
Cells that are editable cannot be selected (note: with this flag set, all cells are editable). |
Note
When XlsProtectionProtectSheetsMode is set to a value other than Default (-1) or None (0), cell content can be edited freely; only the explicitly listed actions are restricted.
Restrictions
The Excel export cannot reproduce every aspect of the rendered report. The following limitations are inherent to the format or the current exporter implementation:
- The print area cannot extend into Excel's non-printable margin, so projects appear slightly wider than in PDF/preview output.
- Background patterns are not preserved.
- Print order between text and rectangle objects is honored only in limited cases. Text appears in the foreground only when the rectangle is drawn before a
ReportContainerand overlaps it. - When text overlaps with image, barcode, or ellipse objects, the latter are always drawn in the foreground.
- Line widths of table and text borders are mapped to the nearest border style available in Excel and may not be reproduced exactly.
- Rectangle shadows are not exported as images.
- When coordinates of different objects are very close to each other, one object's border may overwrite the other's.
- Texts rotated by 180° are not supported and are rendered with 0° rotation.
- Line and paragraph spacing are not exported.
- Negative margins are not supported.
- Expandable regions in tables and drilldowns are not supported.
- Border padding is not supported.
- RTF cells in tables are always horizontally left-aligned and vertically centered.
- Background color of text inside RTF is not exported.
- Right-to-left text in RTF is not rendered correctly.
- Embedded images in RTF are not supported.
- Some special Unicode characters (for example arrows or mathematical symbols) inside RTF runs fall back to a default font to avoid layout issues.
- Spacing between text lines is not supported.
- Horizontal decimal alignment is supported only approximately.
- Copy printing is not supported.
- Excel renders text slightly taller than LLCP's reference rendering. The font scaling factor is configurable via
XlsFontScalingPercentage. - The "draw separators" option of the table object is not supported.
- Objects exported as images must fit entirely within their object frame. Barcode objects with a fixed bar width must therefore be designed so that their content always fits inside the object rectangle.
- The
XlsConvertNumericvalue"2"of the classic exporter (convert only columns that actually contain a numeric value) is not implemented. - Sheet protection passwords are limited to 15 ASCII characters; Unicode characters are not supported.
- Barcodes are currently not rendered correctly.