BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Carlos,
Thanks for contacting Syncfusion support.
We have analyzed your query and you can serialize and
deserialize the spreadsheetcontrol as xml file by using the workbook like in
the below code snippet and it should include formatting, formulas, named ranges
etc.
Code
Snippet[C#]:
private void Serialize_Click(object sender, RoutedEventArgs e) { IWorkbook workbook = this.spreadsheetControl1.ExcelProperties.WorkBook; workbook.SaveAsXml('test.xml', ExcelXmlSaveType.MSExcel); } private void DeSerialize_Click(object sender, RoutedEventArgs e) { ExcelEngine engine = new ExcelEngine(); IWorkbook workbook = engine.Excel.Workbooks.OpenFromXml('test.xml', ExcelXmlOpenType.MSExcel); this.spreadsheetControl1.ImportFromExcel(workbook); } |
We have prepared a sample based on this and you can
download the sample from the below location.
Sample: SpreadsheetDemo_WPF.zip
Regards,
Pannir
Hi Carlos,
Sorry for the inconvenience caused.
The reported query in this forum has been updated in the incident #111919 and you can follow the incident #111919 for further updates.
Please let us know if you have any queries.
Thanks,
Pannir
Hi Andreas,
Yes. Now Serialization and Deserialization works properly in the SpreadsheetControl by using the code snippet provided in the previous update.
Please let us know if you need any further assistance.
Regards,
Pannir