office web component 11 with VB.NET

I'm creating a windows application in and I'm using a Pivot table to access a local cube(sales.cub) and a chartspace object to view the graph.

My question is how to populate the chartspace in VB.NET. In other words, how do I bind the chart to the Pivot table, so that each time the pivot table changes the charting objects changes too.

Thank you.

Who is Participating?
moduloConnect With a Mentor Commented:
Closed, 125 points refunded.

Community Support Moderator
Experts Exchange
looking at this KB you can use an xml file as an intermediate strucutre for the datastorage

title : HOW TO: Use the Office Web Components with XML Data Generated by an XML Web Service Created Using ASP.NET
source :;en-us;315695

couldn't find a direct way of sharing the data between the 2 components through a  datasource property on both but maybe someone else will
sukhdevAuthor Commented:
I'm still trying to do it... haven't been successful still....  please help me.....

thank you.
sukhdevAuthor Commented:
Hi guys... I've found the solution...

Let me share it... maybe someone else might be looking for the same thing.

There's a slight difference in binding charts to pivot table in vb6 and

Below is the solution for binding a chartspace to a pivot table in VB6
In VB6
myChartspace.Datasource = myPivotTable

Below is the solution for binding a chartspace to a pivot table in VB.NET
myChartspace.Datasource = myPivotTable.GetOcx

Reason: In VB6 the datasource property of the myChartspace has a default value as myPivotTable
Whereas, in VB.NET, the OWC component DOES NOT support early binding, so therefore there is no default property for the DataSource.

We must manually use GetOcx method, to return the object that reprsents the ActiveX Control.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.