We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Serialize/Deserialize Spreadsheet Control

Thread ID:

Created:

Updated:

Platform:

Replies:

110608 Aug 15,2013 08:08 PM UTC Oct 16,2013 01:35 PM UTC WPF 5
loading
Tags: SpreadsheetControl(Classic)
Carlos Diaz
Asked On August 15, 2013 08:08 PM UTC

Hi,

I'd like to know if it is possible to serialize/deserialize the spreadsheet control as string, xml, binary, etc. Including;

Formatting
Named Ranges
Formulas
etc,

I'd appreciate your help.

Thanks in advance.

Carlos Diaz.

Pannir Selvam S [Syncfusion]
Replied On August 20, 2013 05:47 AM UTC

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


Carlos Diaz
Replied On August 20, 2013 08:10 PM UTC

Hi Pannir,

I have a problem with the solution that you mentioned, and surely you will able to reproduce the problem: ( use the same project that you attached before )

1. Click on Serialize.
2. Click on Deserialize.
3. Click on Serialize again, HERE is raising an exception ( ArgumentOutOfRangeException ).

Could you help me to resolve that?

Thanks in advance.

Carlos Diaz.

Pannir Selvam S [Syncfusion]
Replied On August 26, 2013 07:19 AM UTC

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


Andreas Rothmann
Replied On October 9, 2013 06:30 AM UTC

Hi,

i am currently evaluating the spreadsheet control. Now the functionality is essential for my application. I am not sure i am able to follow incident from other users, so my question: Is the serialization and deserialization fixed in the latest update?

Thank you very much!
Andy

Pannir Selvam S [Syncfusion]
Replied On October 16, 2013 01:35 PM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;