BusinessObjects Board

ExportAsExcel exports only one folder !

I want to export a report consisting of several sheets/folders to Excel via a VB-Macro. The following script is used:

ActiveDocument.ActiveReport.ExportAsExcel (“test.xls”)

Unfortunately only the first folder is exported. What we are looking for is the behaviour as the regular “Save as Excel” funtionality that exports all folders. Can this be done from within a VB-macro ?

Thanks in advance,

TC


mb_prof (BOB member since 2005-11-25)

Yes, to duplicate the “Save as Excel” functionality, you have to use the … well, .SaveAs method. Use .xls as the extension on the filename, and it the entire workbook will be saved.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Does BO analyse the file extension ? I would have thought the SaveAs-method will save always in BO-FullClient format (like .rep) ?


mb_prof (BOB member since 2005-11-25)

Nope. It looks at the extension…


dirmiger :us: (BOB member since 2002-08-28)

Thanks alot - this way it works !!


mb_prof (BOB member since 2005-11-25)

Oh my hat.

I wish I’d known this a few months ago. I’ve been doing things in the most complicated and stupid way you can imagine!

Thanks very much for the question and the answer!

Cheers,
Pete


foshdafosh :uk: (BOB member since 2004-05-04)

oh, you are freeking kidding me… I have done those loops thru active documents before - this is SO much easier.

now I can die a happy guy.

B.


bdouglas :switzerland: (BOB member since 2002-08-29)

This is absolutely fantastic…!!!
Thank you everyone…Long Live BOB indeed!!!


Buddy :india: (BOB member since 2006-08-04)

Hi,

Also have a look at the addin in BOBs downloads that allows you to convert to an XL file via a macro.

Best regards,

Mark


robbinma4 :uk: (BOB member since 2005-07-31)