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

Free Support Forum - aspose.com

Import and export an excell workbook from and to an XML

Is there a way to reliably export a workbook to an XML stream and import it back without loosing any of the original attributes and data ?

thanks ahead


Well, you may save the workbook to xml (SpreadsheetML file) and can import/open the file back too.

See the following save method version for Workbook:
save(java.io.OutputStream stream,
int fileFormatType)

Also, see the following open method version for Workbook:

open(java.io.InputStream stream,
int fileFormatType)

See some documents for reference:

Thank you.

Thanks so much, again :slight_smile:

However, i did not see any XML among the available formats. if i, instead, use one of the open formats, such as HTML and CSV, i’m afraid i won’t be able to reliably restore the original worksheet from those formats when i import them back in.

The rest of the formats there, such as those various Excel versions and PDF, are not open. See i need to export, selectively manipulate some data, and import the modified worksheet back.

Any ideas?

oh, sorry. guess your response took a while to really sink in :slight_smile:

SpreadsheetML. that’s it. wasn’t a ware of that format at all…
seems like it’s exactly the right solution, and at the right time.

Thanks a lot