Visual Studio Development Bookmark and Share   
 index > Visual Studio Tools for Office > How to persist "data links/sources" from dynamic ListObject to other Excel components like Charts or Pivot Tables?
 

How to persist "data links/sources" from dynamic ListObject to other Excel components like Charts or Pivot Tables?

Hello,

 

I am facing one an issue to persist "data links/sources" from ListObject to other Excel components like Charts or Pivot Tables.

 

Steps to reproduce.

 

1)      Create Excel AddIn.

2)      Add a ListObject to the worksheet runtime

3)      Assign a Datatable to ListObject

4)      ListObject populate data

5)    User add Chart or PivotTable and use populated ListObject as "Data Source".

5)      User save the Excel file

6)      User re-open the Excel file

7)      Recreate ListObject as VSTO obejct  (Excel Add-In Dynamic Controls Sample - http://msdn.microsoft.com/en-us/library/cc442871.aspx)

8)   Reassign refreshed Datatable to ListObject

9)    ListObject populate data

10) Chart and/or Pivot table loose "Data Source" connection and show nothing..



How can I solve this issue ?



P.s. If I refresh data without closing and reopening Excel file everything works as expected.

aaronlt  Wednesday, October 07, 2009 12:03 PM

Hi,

For reproducing this issue in my said, Would you please tell me more information about step 3 and 5?

Regarding this scenario, I think it is caused by data caching. To access data after closing Excel, we need to cache the data. Unfortunately, data cache is not the feature of application-level projects. It is only for document-level ones. Please refer to these resources: Caching Data and Caching custom data.

Best regards,
Bessie


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bessie Zhao  Monday, October 12, 2009 10:33 AM
We are changing the issue type to "General Discussion" because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to "Question" by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bessie Zhao  Friday, October 16, 2009 10:58 AM

You can use google to search for other answers

Custom Search

More Threads

• Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following err
• Where can I get detailed information on MS WORD, How it works
• Outlook 2007 Form Regions
• Excel 2007 object model thread safety
• Excel to xml conversion -Decimal point problem
• Updating the add-in without RE-install ..
• XLMS doc won't load in 2007
• IHostItemProvider was not available IDE Error
• Question re the CRM Integration Add-In Sample For Outlook 2003 (2)
• Outlook add-in: setup package & deployment manifest