Help Binding Spreadsheet to PivotTable control

B

Bryan

I have a web page where I have a spreadsheet component that I load with data
and would like to bind that to a pivot table component so that as the data
in the spreadsheet changes it is reflected in the pivot table. I have found
documentation about how to bind a spreadsheet to a chart in the OWC VBA help
file using

Set c = ChartSpace1.Constants
Set ChartSpace1.DataSource = Spreadsheet1.Object
ChartSpace1.Charts.Add
ChartSpace1.Charts(0).Type = c.chChartTypeLineMarkers
ChartSpace1.Charts(0).SetData c.chDimCategories, 0, "a2:a28"
ChartSpace1.Charts(0).SetData c.chDimSeriesNames, 0, "b1"
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimValues, 0, "b2:b28"

But am unclear how I can do this same sort of thing with a pivot table. In
the above example I am also unclear how it would know which sheet to
reference for the ranges specified.

Any help would be greatly appreciated
 
W

Wei-Dong XU [MSFT]

Hi Bryan,

As I know, the pivottable component should use one ADO source as the data
source. For your requirement, I'd suggest you will need to write code to
read the data at spreadsheet into pivottable cell by cell. We have no way
to easily bind the pivottable into the spreadsheet directly as Chart with
spreadsheet. So I'd suggest please write code direct to obtain data from
Spreadsheet and then assign it to pivottable.

This link contains many code samples regarding how to use the OWC:(though
it applies to OWC9&OWC10, it will also be helpful for OWC11)
http://download.microsoft.com/download/office2000dev/sample/1/win98/en-us/ow
ebcomp.exe

Please feel free to let me know if you have any further question on this
matter.

Best Regards,
Wei-Dong XU
Microsoft Product Support Services
This posting is provided "AS IS" with no warranties, and confers no rights.
It is my pleasure to be of assistance.
 

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