Get datasource

Hello
Is their any way in aspose using which we can refresh external links datasource if it is present in excel work book irrespective number of sheet or we can set data refresh option to true in document of aspose i got “update link type” but i am not able to implement it also i got updateLinkedSource but in this i have to get all data source and then i have to refresh these and also it is taking too long to refresh, so if you have any suggestions please help.

Thanks

@asposeLegit,

Aspose.Cells does not support to refresh objects (e.g., Pivot Table, Charts or other embedded objects, etc.) whose data sources are external. The component only supports to refresh or calculate objects, whose data sources should be resided / present in the current workbook and there should be no links / references to external data source or files.

However, if you are working with formulas, Aspose.Cells does support to calculate formulas whose source is external workbooks. You may try to use Workbook.updateLinkedDataSource() method for the task if it works. Here you need to load/open the source (external) file(s) via Workbook object separately. See the sample thread for your refence.

The thread which you have shared to me in that for updateLinkedDatasource in that we have to give all the data source which is present in the workbook right? to refresh and also i want to know how to use “update link type” class in python because i have seen in the documentation it is given we can set the auto update data source of external links using it, so is it possible?

@asposeLegit,
Currently, you can update the information in the link. When you open an Excel file, Excel will retrieve and refresh the data based on the latest information. We currently do not support obtaining external data and performing refresh calculations.

Hello @amjad.sahi & @John.He,

Thanks for your reply guys, actually i also wanna ask is their any way using which can i create multiple workbook basically i am getting all the datasource from excel file and after getting all datasource which is excel file only, i want to make them read as workbook for aspose cells basically automatically i want to do it not manually.

And also can you help me that how to use Excel connection class for python

Thanks again.

@asposeLegit,

As we told you Aspose.Cells does not support to refresh and extract external data source for objects.
Also, currently, the support for refreshing external data connections including SQL Connection Data and retrieving data is not available.

We are sorry for any inconvenience caused!

Okay @amjad.sahi, so is their any way in asposecells using which we can create macro or vba code in excel.
Thanks for the reply(now i am trying to update links through macros but for this i am using asposecells to insert vba code(macros) in excel) also after inserting can we just run macro in excel.

@asposeLegit,
Yes, you can run vba code(macros) in excel.

Oh great @John.He how can we do this can you give some sample code pls
Thank you so much for the reply.

@asposeLegit,
You need to write your vba code in Excel, and then call your vba code in the workbook open event. When an Excel file is opened, your operation will be automatically executed.

But if my excel file is not opened then can it execute?

@asposeLegit,

Aspose.Cells does not support to execute or run macros/vba codes. Currently, you may only read, write or update vba codes or macros in Excel files via Aspose.Cells.