BusinessObjects Board

exporting tabs to excel

Hi All,

Is there any way to save certain tabs (not all) of a report as a excel file. I have about 9 tabs in a report and just need 5-6 tabs to be saved as a excel file. Any suggestions…


anupsingh (BOB member since 2006-03-27)

Hi,

you can use macro to do it.

Have you tried to use BOB’s search to find any examples of how to write such macro?

Useful keywords could be: macro tab excel export


Marek Chladny :slovakia: (BOB member since 2003-11-27)

As Marek suggested, you can do it with Macro.

Here is a VBA macro as a sample, put this code in the AfterRefresh Event.
This will save/export the first 5 tabs in Excel format on your machine in ‘C’ drive with the tab/report name.

Note : You must have VBA installed on your system and must be enabled for you in Supervisor. :smiley:


Private Sub Document_AfterRefresh()

ActiveDocument.Reports(1).ExportAsExcel ("C:\" & ActiveDocument.Reports(1).Name)
ActiveDocument.Reports(2).ExportAsExcel ("C:\" & ActiveDocument.Reports(2).Name)
ActiveDocument.Reports(3).ExportAsExcel ("C:\" & ActiveDocument.Reports(3).Name)
ActiveDocument.Reports(4).ExportAsExcel ("C:\" & ActiveDocument.Reports(4).Name)
ActiveDocument.Reports(5).ExportAsExcel ("C:\" & ActiveDocument.Reports(5).Name)

End Sub

You can add/remove code for different tabs as per your requirement.

Good Luck. 8)


BO_Chief :us: (BOB member since 2004-06-06)

Hey Chief,

The macro that u have suggested me works good with saving tabs in different excel files and at the same time, the user doesn’t have any option but to save this file elsewhere, but at a specific location. But, my requirement is somewhat different. I want the required tabs to be saved to excel and that the user should have his liberty to browse it to their desired location. Hopefully, I am clear about this requirement.

I would appreciate your quick response towards this ASAP.

Moderator comment: Please do not use Instant Message abbreviations on BOB, such as “u” for “you”. We are an international community, and spelling out the words will make BOB easier for everyone.


anupsingh (BOB member since 2006-03-27)

If the user wants liberty, then install this add-in on the users machine.

Following is the link:

https://bobj-board.org/t/20393

Download this utility onto users machine, copy the add-in into the ‘Addin’ directory, Sign into BO Reporter, You should see a menu with name ‘Convert’.

Using this utility you can save the BO report in 3 formats .txt, .pdf, .xls.

If you have any problems, let me know.

Good Luck


BO_Chief :us: (BOB member since 2004-06-06)

Chief,

Do we need to have VB on our system to download the .rea file because the file was not being recognized by the system. Secondly, I wasn’t able to see the Convert menu.

Can u help me out.
[/code]

Moderator comment: Please do not use Instant Message abbreviations on BOB, such as “u” for “you”. We are an international community, and spelling out the words will make BOB easier for everyone.

I also deleted your duplicate post. Please be patient, don’t hit the Submit button more than once.


anupsingh (BOB member since 2006-03-27)

Yes, you need to have VBA installed on your system. If you have installed BO software on your machine through CD, It should install by default.

In addition to that, you must have VBA privileges enabled for you in Supervisor, Also you must have Microsoft Office installed on your system. Because Word, Excel, Access are other examples of using VBA macros.

You can test, whether VBA is installed on your machine by running the code which is present here

Follow the instructions given in my post from the above link.

Let me know what happened.


BO_Chief :us: (BOB member since 2004-06-06)

One more thing, I forgot to remind you is, After you copy the .rea file in the 'add-in’s directory.

Login to the Reporter, Go To -->Tools --> Click Addins --> you should see convert.rea listed in there.

tick the check box on the left side, After this the Addin will be activated for you.

Repeat the same, If you want to add this Addin on the other machines.

Good luck


BO_Chief :us: (BOB member since 2004-06-06)

Hey Chief,

The add-in works for me on my local system. But, there seems to be another problem to it. I can just select only one report to save in excel. What if I want to select a group of reports and save it in excel.

Another concern which haunts me is that do the end-users have to do this installation on their local system because there are more than 1,000 users for this report.


anupsingh (BOB member since 2006-03-27)

Anup Wrote:

No you can’t do it at once, you can save in excel one by one.

If you want to group the reports in one excel file, then create a new report tab bring all the report blocks from all the different tabs to this tab, copy and paste it one below the other, then save this single tab, so you will have all the 4 or 5 tabs in a single tab. Then save this single tab in Excel.

Note : you cannot export more than 65000+ rows in excel.

Yes, you have to install this add-in on each user machine whoever wants to save the reports using this utility. If there are 1000 users using your report, then you have to install it on 1000 machines.

Is BO installation is already done on this 1000 machines ? If it is not then, When your network team installs BO Front end on those machines, tell them to copy this add-in to 'addin’s directory.

Any other questions, let us know.


BO_Chief :us: (BOB member since 2004-06-06)

Thanks a lot Chief. I may buzz you as and when needed. :smiley:
I have some more issues with my other reports too. I might see you then.


anupsingh (BOB member since 2006-03-27)

No problem, Its my pleasure. 8)


BO_Chief :us: (BOB member since 2004-06-06)

Chief,

If I want to remove the Convert menu from the application, what should I do? Should I uncheck the conversions add-in and restart the application.


anupsingh (BOB member since 2006-03-27)

Yes Anup, you are right!!

It will remove the add-in when you un-tick the box… :yesnod:


BO_Chief :us: (BOB member since 2004-06-06)

Chief,

Do you really think that there is no other way around to save a limited number of tabs into excel. Let me know.


anupsingh (BOB member since 2006-03-27)

There are different ways but… what to say:

  1. You have been given a direct code to save different tabs…
  2. you have the utility(addin) to save in the specific directory…

If you don’t want the above… solutions, Then tell your end-users to separate the report into two: In one keep only those tabs in the document which you have to save, just save it at once as a full complete document… and in the other only those tabs which they don’t want to save.

I hope you got what I am saying …


BO_Chief :us: (BOB member since 2004-06-06)

This is something I am looking to do as well, only the saving to Excel would need to be through Webi.
So if a report has multiple tabs the user needs the option to Download to Excel their specific tab only.

I need to know which .asp files to modify and if anyone has ever done this to save me of re-inventing the wheel.


toscajo (BOB member since 2002-09-04)

Not sure what version you are running but in Webi you can save to excel as part of the standard software. You don’t need any additional macros. Why don’t you create a report version that has just the tabs they need to download or have the users delete the tabs they don’t need once it is in excel?


Michele Pinti (BOB member since 2002-06-17)

I am using Webi version 6. Although the users can download the report to Excel and then delete the tabs they don’t want. This would not work efficiently and become very time consuming.
Some of the reports have multiple tabs which can be fairly lengthy. To download the report in Excel and then delete each tab would take an unacceptable amount of time.


toscajo (BOB member since 2002-09-04)