BusinessObjects Board

Read contents of a table via VBA... (possible?)

I’m thinking that this is not possible…but i thought i would ask anyhow. I am wondering if i can read the data in a table on a given report tab. I’m trying to create a data provider on the fly based on data that is displayed in this table. (doing this to overcome an issue that BusObj cannot find a workaround for - filtering on measures that have been defined using multiple data providers).
I can do this via dumping that particular report tab to excel then bring it back in (this works). I’m just looking to see if there isn’t a cleaner way of accomplishing this.

Thanks,
Jorge


jresendez :mexico: (BOB member since 2004-05-03)

Hi Jorge,

unfortunately, you are right. It is not possible to read data from the table using VBA.

Generally, very few things are exposed in VBA that can be used for data manipulating. :frowning:


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

Hi Jorge,

I have written a small VBA routine to read the cell values of a report table which I created from efashion universe.

I am attaching the report. Download and Refresh the report.

I have used BO 6.5.1. You can modify accordingly as per your requirement.

Is this what you are looking for?


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

Hi,

the code is nice however it reads data from the document variables - they are created based on the objects of dataproviders. So the code reads detailed data as they are stored in the DPs.

If you delete the table that is in your example and create a new one with for example and objects then the code will still return the same detailed data as in the first case. You will not get sales revenue sums per cities :?

The problem is that it is not possible to reference a table (better said datablock) in VBA. The code is referencing document variables, it means detailed data.


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

Marek,
you are right… :slight_smile:

I am new to VBA trying to explore on my own. When I have free time, I play around with VBA, Its sometimes very interesting…

Thanks for pointing me about what my script will do and what it can’t.


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

I am on the very same boat :mrgreen: I still consider myself as VBA beginner and I also play and try with VBA and see what I am able to do and on the other hand where my knowledge is too short. BOB is a perfect source of information, I learned a lot using information I found here.

More power to BOB :smiley:


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

Thanks for the reply…However it is reading from the DP…which we can do already…it’s the reading from the actual table that is causing the problems.


jresendez :mexico: (BOB member since 2004-05-03)

As stated before, it is simply not possible to read the data directly from a table (report block). The workaround would be to export the report tab to a temporary text file, and read that text file back in (with ADO, for example).


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