We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Writing to Worksheet.QueryTables

I’m trying to write to the queryTables of a worksheet, however queryTables is a read-only object for a worksheet. Is there a way to get around this? All the docs/examples I found only show how to read a queryTable

My use case is to copy the queryTables of 1 worksheet to another worksheet

Well, I am afraid you cannot add QueryTables in the worksheet to directly fetch data from your data source. Instead we provide some valuable methods for Cells class and you may import data from DataTable, DataSet, Array, ArrayList and other objects to fill the worksheet cells. All you need to do is use your .NET APIs to fill data to a data table/dataset or array etc., then use the Importing data options provided by Aspose.Cells to fetch data to fill the worksheet cells. See the document for your complete reference:

Import Data into Worksheet

Thank you.