M
mathieu
Hi there,
I am banging my head trying to use: ExportAsFixedFormat.
I am using Excel 2007, with PDF export, everything works fine doing
it by hand. All I am trying is:
- open the xls file (1997 format)
- add some charts
- export to pdf
But I get this funky error saying that my file is not saved. If I try
then to save it as .xls file, my charts become green (don't ask). And
if I try to save it as ".xlsx" I cannot reopen the file, Excel tells
me that the file is not recognize:
....
wb.SaveAs( fullpath ) # how do I specify I want the new .xslx format ?
wb.Close( )
# reopen to please Excel about "unsaved workbook"
wb = xl.Workbooks.Open( fullpath )
ws = wb.Worksheets(1)
ws.ExportAsFixedFormat(Type=constants.xlTypePDF,
Filename=fullpath_pdf, Quality=constants.xlQualityStandard,
IncludeDocProperties=True, IgnorePrintAreas=False,
OpenAfterPublish=False)
....
Thanks !
I am banging my head trying to use: ExportAsFixedFormat.
I am using Excel 2007, with PDF export, everything works fine doing
it by hand. All I am trying is:
- open the xls file (1997 format)
- add some charts
- export to pdf
But I get this funky error saying that my file is not saved. If I try
then to save it as .xls file, my charts become green (don't ask). And
if I try to save it as ".xlsx" I cannot reopen the file, Excel tells
me that the file is not recognize:
....
wb.SaveAs( fullpath ) # how do I specify I want the new .xslx format ?
wb.Close( )
# reopen to please Excel about "unsaved workbook"
wb = xl.Workbooks.Open( fullpath )
ws = wb.Worksheets(1)
ws.ExportAsFixedFormat(Type=constants.xlTypePDF,
Filename=fullpath_pdf, Quality=constants.xlQualityStandard,
IncludeDocProperties=True, IgnorePrintAreas=False,
OpenAfterPublish=False)
....
Thanks !