Programming Interface

You can find a description of all options used in the XLS export module in this chapter. The options can be modified using the methods LlXSetParameter(..."XLS"...) and read by calling LlXGet­Parameter(..."XLS"...).

Resolution: Defines the resolution in dpi for the generation of pictures. Default: 300 dpi.

Picture.BitsPerPixel: Defines the color depth of the generated picture. Please note that the picture files will quickly get very large with higher color depths.

Value

Meaning

1

Black & White

24

24bit True Color

Default

24

 

Picture.JPEGQuality: Specifies the quality and the corresponding compression factor of the generated JPEG graphic. The value lies between 0 and 100, with 100 representing the highest quality (and therefore the least compression). Takes effect only when the source graphic is not the JPEG format, as encoding of JPEG to JPEG would result in a quality loss. Default: 75

Verbosity.Rectangle: Configures how rectangle objects should be exported.

Value

Meaning

0

Ignore object

1

Object as rectangle

2

Object as picture

Default

1

 

Verbosity.Barcode: Configures how barcode objects should be exported.

Value

Meaning

0

Ignore object

1

Object as picture

Default

1

 

Verbosity.Drawing: Configures how picture objects should be exported.

Value

Meaning

0

Ignore object

1

Object as picture

Default

1

 

Verbosity.Ellipse: Configures how ellipse objects should be exported.

Value

Meaning

0

Ignore object

1

Object as picture

Default

1

 

Verbosity.Line: Configures how line objects should be exported.

Value

Meaning

0

Ignore object

1

Object as line

2

Object as picture

Default

1

 

Verbosity.Text: Configures how text objects should be exported.

Value

Meaning

0

Ignore object

1

Object as text object

2

Object as picture

Default

1

 

Verbosity.RTF: Configures how RTF objects should be exported.

Value

Meaning

0

Ignore object

1

As unformatted text

2

Object as picture

Default

1

 

Verbosity.Table: Configures how table objects should be exported.

Value

Meaning

0

Ignore object

1

As a complete table object

Default

1

 

Verbosity.LLXObject: Configures how LLX objects (e.g. chart object) should be exported.

Value

Meaning

0

Ignore object

1

Object as JPEG

Default

1

 

XLS.FontScalingPercentage: Scaling factor for the font sizes. Necessary in order to compensate for the increased text height in Excel. Maximum value: 100, Default: 89

XLS.PrintingZoom: Scaling factor for the printout of the project. Necessary in order to compensate for the inability to place any objects in the non-printable area. Default: 88(=88% zoom)

XLS.IgnoreGroupLines: Allows group header and footer lines to be ignored in the resulting Excel file. Only effective if Export.OnlyTabledata has been set (see below).

Value

Meaning

0

Group lines are exported

1

Group lines are ignored

Default

1

 

XLS.IgnoreHeaderFooterLines: Allows header and footer lines to be ignored in the resulting Excel file. Only effective if Export.OnlyTabledata has been set (see below).

Value

Meaning

0

Header and footer lines are exported

1

Header and footer lines are ignored

2

Header and footer lines are exported once on the first page. To export the footer lines only on the last page, set the appearance condition to LastPage().

Default

1

 

XLS.IgnoreLinewrapForDataOnlyExport: Allows line wraps to be ignored. Only effective if Export.OnlyTabledata has been set (see below).

Value

Meaning

0

Line wraps are exported to Excel

1

Line wraps are ignored

Default

1

 

XLS.ConvertNumeric: Allows switching of the automatic conversion of numeric values in the created Excel sheet.

Value

Meaning

0

No automatic conversion

1

Numeric values are formatted according to the setting in the Designer under 'File > Options > Project'.

2

Only columns which actually contain a numeric value (e.g. a price) will be converted. If a numeric column is explicitly formatted in List & Label (e.g. Str$(price,0,0)), then it will not be converted.

3

List & Label tries to transform the output formatting configured in the Designer to Excel as exact as possible. If the "Format" property in the Designer is not used, the content will be passed as Number to Excel in case it's numeric, otherwise as Text.

Default

3

 

XLS.AllPagesOneSheet: Enables the creation of a separate XLS worksheet for each page.

Value

Meaning

0

Create separate worksheet for each page

1

All pages are added to the same worksheet

Default

1

 

XLS.WorksheetName: Configures the name of the worksheet(s). You can use the format identifier "%d" in the name. It will be replaced by the page number at runtime (ex. "Report page %d").

XLS.FileFormat: Configures the file format.

Value

Meaning

0

Format is recognized automatically by the file extension

1

Office XML (XLSX) format will be used

2

Excel (XLS) format will be used

Default

0

 

XLS.ShowGridLines: Allows to show or hide the grid lines.

Value

Meaning

0

Grid lines are hidden

1

Grid lines are shown

Default

1

 

XLS.AutoFormula: Allows automatic conversion of Excel formulas.

Value

Meaning

0

No automatic conversion.

1

Texts that start with "=" are automatically transferred to Excel as a formula.

Default

0

 

Note: Please note that it is mandatory to use the English function names (e.g. "SUM" instead of the German "SUMME"), the corresponding localization to "SUMS" is done automatically by Excel. Helpful in this context is the Microsoft website https://support.microsoft.com/en-us/office/excel-functions-translator-f262d0c0-991c-485b-89b6-32cc8d326889. Likewise, fixed numbers must be specified in US notation (e.g. 3.1415 instead of 3,1415). Otherwise, a defective Excel export may be the result.

XLS.Protection.ProtectSheets: Allows to prevent various manipulations such as deleting, inserting or formatting of spreadsheets by password protection.

Value

Meaning

0

No protection.

1

All spreadsheets are protected against editing.

Default

0

 

XLS.Protection.ProtectSheetsPassword: Specifies the password for XLS.Protection.ProtectSheets, which can be used to unprotect the Excel file later. Default: empty

XLS.Protection.ProtectSheetsMode: Type of protection if XLS.Protection.ProtectSheets is set to "1". Here either -1 or a mixture of the following flags combined by "or" can be passed.

Value

Meaning

-1

Default protection.

0

All spreadsheets are protected against editing.

1

Objects are locked.

2

Scenarios are locked.

4

Formatting of cells is allowed.

8

Formatting of columns is allowed.

16

Formatting of rows is allowed.

32

Inserting columns is allowed.

64

Inserting rows is allowed.

128

Inserting hyperlinks is allowed.

256

Deleting columns is allowed.

512

Deleting rows is allowed.

1024

Selection of locked cells is locked.

2048

Sorting is allowed.

4096

Autofilters are allowed.

8192

Pivot tables are allowed.

16384

Selection of unlocked cells is locked.

Default

-1

 

XLS.AutoFit: When exporting data only, the column widths are automatically adjusted so that the content is completely visible.

Value

Meaning

0

No adjustment.

1

Column widths are adjusted. Can significantly reduce the speed of the export, so use it if the priority is optimized design and not processing speed.

Default

0

 

XLS.HeaderContent: This can be used to specify the content of the header. The text can be up to 255 characters long and can contain special commands, e.g. a placeholder for the page number, the current date or text formatting attributes. The following commands are possible:

Value

Meaning

&L

Beginning of left section

&P

Current page number

&N

Total page number

&\d{1,3}

Font size in points (e.g. &9 or &36)

&S

Text strikethrough

&X

Text superscript

&Y

Text subscript

&C

Beginning of middle section

&D

Date

&T

Time

&U

Text underlined

&E

Text double underlined

&R

Beginning of right section

&Z

Path of a workbook file

&F

Name of a workbook file

&A

Name of a worksheet

&"fontname"

Text font (e.g. &"Comic Sans MS")

&B

Text bold

&I

Text italic

&&

Ampersand character (&)

 

XLS.HeaderMargin: Margin of the header in inches for XLS.HeaderContent.

XLS.FooterContent: This can be used to specify the content of the footer. The text can be up to 255 characters long and can contain special commands, e.g. a placeholder for the page number, the current date or text formatting attributes. See XLS.HeaderContent for possible commands.

XLS.FooterMargin: Margin of the footer in inches for XLS.FooterContent.

Export.Path: Path where the exported files should be saved. If this option is empty, a file selection dialog will always be displayed.

Export.File: File name of the document.

Export.InfinitePage: This "endlessly" increases the size of the page output, you get an export that is not divided by breaks (unless you work with "Pagebreak Before", then the page will still be wrapped there). For this it is mandatory to set the XLS.AllPagesOneSheet option to 1, so that all pages are created in the same worksheet.

Value

Meaning

0

Single pages

1

Endless page

Default

0

 

Export.Quiet: Use this option to configure the possibility of exporting without user interaction.

Value

Meaning

0

Export with user interaction (dialogs)

1

No dialogs or message boxes will be displayed (only if Export.Path was specified).

Default

0

 

Export.ShowResult: Specifies whether the export result will be displayed automatically. The program that displays the result will be determined by the registered file extension.

Value

Meaning

0

Result will not be displayed automatically

1

Calls ShellExecute() with Export.File.

Default

0

 

Export.ShowResultAvailable: Enables to hide the respective checkbox in the dialog.

Value

Meaning

0

Checkbox will be hidden

1

Checkbox will be available

Default

1

 

Export.OnlyTableData: Only data from table lines will be exported.

Value

Meaning

0

All objects are exported.

1

Only table cells and their data are exported. The font properties "Bold", "Italic" and the horizontal alignment of the text is used in the result file. Other format options are ignored to ensure best reusability of the result in Excel.

Default

0