ExcelWorkbookToImageEx

Converts a page with *.xls or *.xlsx file to a page or pages in TIFF format.

Member of namespace

Convert

Syntax

bool ExcelWorkbookToImageEx (int maxOutputPages, int startingSheet, bool singleSheetOutput)

Parameters

maxOutputPages
0 to convert all pages within the spreadsheet, or a positive integer value. Default is 0.
startingSheet
Zero-based sheet index denoting the starting point of conversion. Default is 0.
singleSheetOutput
True to only convert the starting sheet regardless of how many pages are allowed by maxOutputPages. Default is false.

Returns

True if the file is successfully converted to a TIFF document.

False if the current page is not an Excel Workbook or if there is a failure in the conversion.

If the number of input files/pages exceeds the maximum allowed or if there is a failure in the conversion, the batch is set to abort.

Level

Page level.

Details

If the current page is an Excel Workbook, the file is converted to multiple TIFF files, one TIFF file for each page within the Workbook, based on the settings of the other Excel actions that configure the conversion settings.

The number of converted pages can be capped to avoid excessive output. You can also specify the starting sheet index. If the value is out of range then the last sheet will be used. Conversion is limited to a single sheet when specifically enabled (by using singleSheetOutput or when the maximum converted page count (maxOutputPages) has been met.

Each new TIFF also has a new page created within the application environment which can be processed by subsequent rules. The original file name from which the page was extracted is stored in the ParentImage variable, for possible future reference within your application.

If the configured output image format and compression only supports black and white, such as CCITT4, colored text is exported as black and background shading is set to white.

Example:
ExcelPrintQuality(200)
ExcelTiffCompression(CCITT4)
ExcelPrintBlankPage(False)
ExcelWorkbookToImageEx(5,0,false)