ImportXml and ExportXml

Hi Support Team

Currently ImportXml function takes input as filepath. Is it possible to take the data from string?
Similarly the ExportXml function output can be as string, instead of file. We have some sensitive phi information we don’t want to create the temporary file in the server.

I will appreciate if you can implement these features.

Regards,
Ramesh

@rameshpatra,

Thanks for your query.

I am afraid, there is no such overloaded method of ImportXml/ExportXml to take/save data from/to strings. Both methods get/save data from/to file path. Do you want to have overloads to import/export data from/to streams?

That would be very nice feature if you have some overloaded method. We would appreciate if you can implement this.

Regards,
Ramesh

@rameshpatra,

Do you want to have overloads (for ImportXml and ExportXml) to import/export data from/to streams?

Yes, please

Thanks
Ramesh

@rameshpatra,
Thank you for your feedback. We have logged this requirement of overloaded methods in our database for detailed analysis and an implementation if possible. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46981 – Overloads required to read/write memory stream using Workbook.ImportXml and Workbook.ExportXml

Thank you.

Regards,
Ramesh

@rameshpatra,
You are welcome.

@rameshpatra,
For the API: Workbook.ImportXml(string url, string sheetName, int row, int col) , generally, we write the param url(e.g. “D:\Download\Input.xml”) to xl\connections.xml:

<connections xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    <connection id="1" name="Input" type="4" refreshedVersion="0" background="1">
        <webPr xml="1" sourceData="1" parsePre="1" consecutive="1" url="D:\Download\Input.xml" htmlTables="1"/>
    </connection>
</connections>

It can be used to update data in the Excel file where the xml file data is changed. However, when you copy the Excel file to another machine, this url in the Excel file may be not useful.
So when we add the new API: Workbook.ImportXml(Stream stream, string sheetName, int row, int col) , now there is no url specified, we will the write url="FromStream" to the url in xl\connections.xml

Will it be OK for you? Let us know your feedback.

Hi

For our requirement we are ok with the url =“FromStream” .

Regards,
Ramesh

@rameshpatra,
Thank you for the feedback. We will consider it while working on this requirement.

@rameshpatra,

Please try our latest version/fix: Aspose.Cells for .NET v19.10.5 (attached)

We have added the new APIs:
Workbook.ImportXml(Stream stream, string sheetName, int row, int col) and Workbook.ExportXml(string mapName, Stream stream)

Let us know your feedback.
Aspose.Cells19.10.5 For .Net2_AuthenticodeSigned.Zip (5.0 MB)
Aspose.Cells19.10.5 For .Net4.0.Zip (5.0 MB)

The issues you have found earlier (filed as CELLSNET-46981) have been fixed in Aspose.Cells for .NET v19.11. This message was posted using Bugs notification tool by Amjad_Sahi