Import XML Map inside a Workbook using Aspose.Cells

Hi guys


I read on Stack Overflow that export to XML (map) could be supported in 2nd or 3rd quarter this year.

We are currently evaluating Aspose.Cells and this is a key feature requirement for us. Any update on pending availability of this feature?

Thanks,
Rick
rickd-1:
Hi guys

I read on Stack Overflow that export to XML (map) could be supported in 2nd or 3rd quarter this year.

We are currently evaluating Aspose.Cells and this is a key feature requirement for us. Any update on pending availability of this feature?

Thanks,
Rick
Hi,

Thanks for your posting and using Aspose.Cells.

Please elaborate your requirements more with some detail and screenshots. We will look into it and let you know if it is supported or not.

Hi Aspose

Can you tell me if you are supporting XML Mapping Import functionality from Excel Developer tab (please see attached print screen for more details) If yes how this can be achieved in C# - example code would be nice J


To be more specific below you can find Office Excel Interop example :


Microsoft.Office.Interop.Excel.Application application = new Microsoft.Office.Interop.Excel.Application();

application.Workbooks.Open("C:\\test\\exceltemplate-with-xmlmapping.xslx");

Microsoft.Office.Interop.Excel.XmlMap map = application.ActiveWorkbook.XmlMaps[1];

application.ActiveWorkbook.XmlImportXml("12", out map);

application.ActiveWorkbook.SaveAs("c:\\test\\excel-with-xmldata.xlsx");

application.Workbooks.Close();

Best regards
Peter

Hi Piotr,

Thanks for your elaboration and considering Aspose.Cells.

We understand your requested feature and logged it in our database as a New Feature request in our database to support it. Hopefully, we will be able to implement it. And in case it is already implemented, we will provide you a sample code. Once there is some news for you, we will update you asap.

This issue has been logged as

  • CELLSNET-43992 - Support XML Mapping Import functionality as it is done from Excel Developer tab

Shakeel,

I am also most interested in the progress of this feature. Could you please provide a hyperlink to the status of this new issue? Or is this thread the place where I can expect to be updated?

Thanks,
John

Hi John,

Thanks for your question and considering Aspose.Cells.

You can check this thread for updates. Or else if you like to create your own thread, we will link that thread to same issue (CELLSNET-43992) and you will get automatic notification in that thread too. We have also added your comment in our database against this issue for product team consideration. Once, there is some news for you, we will update you asap.

I’m tracking this thread too

Hi,

Thanks for your posting and considering Aspose.Cells.

We have also logged your comment in our database against this issue and informed the product team about your interest in this feature. Once, there is some update for you, we will let you know asap.

Is there a way to view the existing XML mapping after loading an existing Workbook? Primarily, I need to connect the DataConnection to the Table that the connection maps to.

Hi,

Thanks for your interest in Aspose.Cells.

Please provide us your sample excel file and explain what do you want to retrieve from it via some screenshots. It will help us investigate your issue and we will let you know if your requirements could be achieved using Aspose.Cells APIs.

In the attached spreadsheet sample.xlsx, there is a Workbook Connection named “Connection” that points to a URL for a web query. The data from that web query is XML data that maps to the sheet using the XML Map named “catalog_Map” to the table named “Table1”.


I can see the URL for the data connection; I need to see enough of the xml map to get the connection id and the table name so that I can determine where the XML data comes from (on the web) and where it goes to (in the document).

Hi,

Thanks for providing us the sample excel file clarifying your requirements and considering Aspose.Cells.

I have investigated this issue with the latest version: Aspose.Cells for .NET 8.6.3 using the following code and I think, it will suit your requirements. I have also attached the screenshot showing the quick watch values of the connection object. Also I have shown the console output of the code for your reference.

Once you have accessed the URL of your XML, you can retrieve it from internet using .NET Framework Networking APIs.

If it does not fit your requirements, could you please clarify it further so that we could look into your issue more closely and precisely. Thanks for your cooperation.

C#

string filePath = @“F:\Shak-Data-RW\Downloads\sample.xlsx”;

Workbook workbook = new Workbook(filePath);

WebQueryConnection con = workbook.DataConnections[0] as WebQueryConnection;

Console.WriteLine("URL: " + con.Url);

Console Output
URL: http://saluce-text-xml.azurewebsites.net/sample.xml

That’s only half the problem, though. First, I need a list of XML maps. In my sample spreadsheet, the XML Map is called catalog_Map (see screenshot). Next, I need to know what data connection id the xml map uses. Finally, I need to know the named table that the xml map actually maps to.



Hi,

Thanks for explaining everything clearly with your screenshot and considering Aspose.Cells.

We are able to understand your feature request. We have therefore logged this issue in our database for investigation. We will look into it and implement this feature. Once the feature is available or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44150 - Ability to work with XML Maps

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSNET-44150 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Hi,

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

See the following codes:

e.g

Sample code:

Workbook workbook = new Workbook();

workbook.ImportXml("http://saluce-text-xml.azurewebsites.net/sample.xml", "Sheet1", 0, 0); 

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-44150;CELLSNET-43992) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Aspose.Cells and XML Map .NET

Related Reply Quote FavoritesContact

Dear Madam od Sir,

Does Aspose.Cells support XML maps ?

I have an Excel file with attached xml schema and cells mapped to the schema.
Is it possible to import/export xml data in such excel using Aspose ?
I can do it in Excel from Developer tab using Import/Export buttons, but I want to do it programmatically, without starting Excel.

Best regards,

Darko

Hi,

Thanks for your posting and considering Aspose.Cells.

Yes, it now supports importing XML Map. Please download and use the latest version:
Aspose.Cells for .NET 8.7.0.

Please see the following documentation article that explains how to import xml map inside your workbook using Aspose.Cells.

Import XML to Excel workbook|Documentation

Hi Shakeel,

That’s great that Cells supports XML Maps now; we are also interested in this feature. However, it looks like this functionality is only available for the .NET libraries. Are there any plans on supporting this feature in Aspose.Cells for Java? There’s no mention of it in the Aspose.Cells for Java 8.7.0 announcement.

Thanks.