ExportToEXCEL

The ExportToEXCEL method converts a PDF document to a Microsoft® Excel® document. This function is only available with the Excel Converter product and requires a call to Document.SetLicenseKey before it can be used.

Syntax

ActiveX:

boolean ExportToEXCEL( BSTR FileName, acExcelExportOptions ExcelOption )

DLL:

int DocConvertToEXCEL(EXTDOCHANDLE edhDocument, LPCWSTR FileName, DWORD OutputOptions)

Parameters

FileName

[in] Full path of resulting Excel file.

ExcelOption, OutputOptions

 

ActiveX Constants

DLL Constants

Value

Description

acExcelExportOptionSingleSheet

EXCELOPTION_SINGLE_SHEET

0

All pages in one sheet.

acExcelExportOptionMultipleSheets

EXCELOPTION_MULTIPLE_SHEETS

1

One sheet per page.

acExcelExportDecimalSeparator_Comma

 

2

Comma separated text file.

 

edhDocument

Handle Returned by DocOpen()

Return Value

The return value is True if the document was converted, False otherwise.

Remarks

This function is only available if the activation code is for the Excel Converter product, or an Excel Converter product combined with other Document Converter products.

Visual Basic Example

 

For  ActiveX:

Dim doc As New CDIntfEx.Document

' enable advanced functions such as Excel Export

doc.SetLicenseKey "Evaluation Version Developer", "07EF..F2975B"

' open a PDF document

doc.Open "c:\test.pdf"

' optimize document to paragraph level before exporting

doc.Optimize 2

' save the PDF document as EXCEL

doc.ExportToEXCEL "c:\test.xls", acExcelExportOptionSingleSheet

Set doc = Nothing