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

Free Support Forum - aspose.com

Why the Spreadsheet XML file cannot open by Aspose.Cells.Workbook

We use excel component to edit excel file and we can get the spreadsheet XML by call excelObj.XMLData.

But the returned XMLData cannot be loaded by Aspose.Cells.Workbook.

I attached the spreadsheet XML file in this thread.

Thanks a lot!


Could you try to read the xml data to fill a dataset using ADO.NET APIs if it works and then use Aspose.Cells's APIs especially Cells.ImportDataTable() to extract data into the spreadsheet.


DataSet ds = new DataSet();
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Cells cells = worksheet.Cells;
cells.ImportDataTable(ds.Tables[0], true, "A1");

Thank you.


Well, since you are using Javascript code and your file is native spreadsheet xml file, so ignore my previous reply. I have tried and tested the scenario using an .asp file (server side javascript code) in an IIS environment. I use the following code and it works fine, attached is the generated file.

Sample code:

var workbook = new ActiveXObject("Aspose.Cells.Workbook");
workbook.Open_6("f:\\test\\F8P2EK707BFHDEG02OBO8PAC.xml", 10);
var sheet
sheet = workbook.Worksheets.item(0);
var cells
cells = sheet.Cells();
var cell
cell = cells.item_3("C26");
cell.PutValue_5("Hello World!");


Thank you.