Failed exporting workbook to fixed format.

66 views
Skip to first unread message

Viczenn Reyes

unread,
Oct 10, 2017, 12:20:24 PM10/10/17
to PDFTron PDFNet SDK
Hi,

We're currently developing a web app using PDFTron SDK, we're currently having issues regarding the conversion of .xls files, we are getting this error. We already set the Application Pool to run as LocalSystem identity. Any assistance would be of help.

Exception:
Message: An error occurred while converting the file.
Detailed error:
Failed exporting workbook to fixed format.
Code: DISP_E_EXCEPTION
COM Interop Error:
Code: 0
ARG Index: 0
File: "Excel.cpp":275
Log:
Start check system account.
Session ID is: 0.
Done checking system account.
Creating an Excel application instance.
Excel application instance created.
Application.AutomationSecurity ID obtained.
Application.AutomationSecurity value set to 3.
Application.DisplayAlerts ID obtained.
Application.Version ID obtained.
Application version: 16.
Application.Build ID obtained.
Application build: 0.
Application.Workbooks ID obtained.
Opening workbook "c:\Output\temp.xls".
Workbooks.Open ID obtained.
Workbook "c:\Output\temp.xls" opened.
Workbook.Saved ID obtained.
Error setting Workbook.Saved value.
Workbook.ExportAsFixedFormat ID obtained.

Failed exporting workbook to fixed format.
Code: DISP_E_EXCEPTION
COM Interop Error:
Code: 0
ARG Index: 0
File: "Excel.cpp":275
Log:
Start check system account.
Session ID is: 0.
Done checking system account.
Creating an Excel application instance.
Excel application instance created.
Application.AutomationSecurity ID obtained.
Application.AutomationSecurity value set to 3.
Application.DisplayAlerts ID obtained.
Application.Version ID obtained.
Application version: 16.
Application.Build ID obtained.
Application build: 0.
Application.Workbooks ID obtained.
Opening workbook "c:\Output\temp.xls".
Workbooks.Open ID obtained.
Workbook "c:\Output\temp.xls" opened.
Workbook.Saved ID obtained.
Error setting Workbook.Saved value.
Workbook.ExportAsFixedFormat ID obtained.

Conditional expression: false
Version : 6.7.1.62249N
Filename : Convert.cpp
Function : trn::PDF::Convert::ToPdf
Linenumber : 1682

Ryan

unread,
Oct 10, 2017, 7:28:39 PM10/10/17
to PDFTron PDFNet SDK
Does this happen with any excel file, or only certain ones?

Can you convert when running as a "normal" process? The error only occurs under IIS?

What about Word or Powerpoint conversions?

Viczenn Reyes

unread,
Oct 13, 2017, 7:54:04 PM10/13/17
to PDFTron PDFNet SDK
I've tried using your Sample projects (ConvertTest.cs) to convert the excel file which I am using to test this, which succeeds in converting the file but when I implement it in our web application it fails.

I was able to convert .doc using .WordToPDF() method and .ppt using .ToPdf() method using a printer.

Ryan

unread,
Oct 13, 2017, 8:27:25 PM10/13/17
to PDFTron PDFNet SDK
I suspect the print spooler service is not activated. See this post for more info.

If that doesn't help, is the Excel application registered/licensed?


Reply all
Reply to author
Forward
0 new messages