Using ExportAsFixedFormat

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 !
 
M

mathieu

Those links are great ! I could solve my issues saving a temporary
file as xslx (.xls would make my chart with a green background).

thanks !
 
D

Dave Peterson

Ron does nice work!
Those links are great ! I could solve my issues saving a temporary
file as xslx (.xls would make my chart with a green background).

thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top