system
January 16, 2006, 3:59pm
#1
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)
system
January 16, 2006, 4:36pm
#2
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 (BOB member since 2002-09-19)
system
January 17, 2006, 8:25am
#3
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.
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)
system
January 17, 2006, 2:34pm
#4
Nope. It looks at the extension…
dirmiger (BOB member since 2002-08-28)
system
January 17, 2006, 2:39pm
#5
Thanks alot - this way it works !!
mb_prof (BOB member since 2005-11-25)
system
February 2, 2006, 11:30am
#6
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 (BOB member since 2004-05-04)
system
September 12, 2006, 8:30pm
#7
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 (BOB member since 2002-08-29)
system
November 27, 2006, 3:57pm
#8
This is absolutely fantastic …!!!
Thank you everyone…Long Live BOB indeed!!!
Buddy (BOB member since 2006-08-04)
system
November 27, 2006, 5:58pm
#9
Hi,
Also have a look at the addin in BOBs downloads that allows you to convert to an XL file via a macro.
Authors:
OlivierV: First conversion addin for PDF only with a “basic”-GUI + documentation…
Avaksi: Integration of XLS and TXT conversion and GUI redesign.
Further discussion on this utility should take place in this topic
Author Notes:
DocConversions.zip (254.0 KB)
BOB Downloads (BOB member since 2003-05-05)
Best regards,
Mark
robbinma4 (BOB member since 2005-07-31)