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

Free Support Forum - aspose.com

Aspose.cells and XML map does not create table

Hi,

I am trying to create an Excel file from an Excel file template that includes XML mappings, load an XML and save the Excel file. When doing it manually in Excel by the Developer ribbon it works fine, but when I use the following code I cannot get all my mappings to work. The only mappings that works are the single cell mappings, my table is not getting updated.

This is my code:
File initialFile = new File(“MyTest2.xlsx”);
InputStream targetStream = new FileInputStream(initialFile);
Workbook workbook = new Workbook(targetStream);

workbook.importXml(“MyTest2.xml”, “Sheet1”, 0, 0);

workbook.save(“MyTestOutput2.xlsx”);

I am using the Java version of Cells, version 18.3.

Any idea of what I am doing wrong? Attached are my sample files.ExcelGeneration.zip (8.6 KB)

@eklind,

Thanks for the template file and XML file.

After an initial test, I am able to reproduce the issue as you mentioned by using your template files and sample code. I have logged a ticket with an id “CELLSJAVA-42583” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@eklind,

Please try our latest version/fix: Aspose.Cells for Java v18.3.9.

Your issue should be fixed in it.

Let us know your feedback.

@Amjad_Sahi,

The fix worked fine, thanks!

Will this version be posted to your repo (https://artifact.aspose.com/repo/com/aspose/aspose-cells/) orr do you know when the next version that include this fix is going to be posted to the repo?

Thanks again for the quick fix.

@eklind

You will have to wait for next official release i.e. 18.4 which will be available around 20th April and it will be provided to users via Maven Repo. It will also contain this hot fix. Thanks for your understanding and patience. Have a good day.

The issues you have found earlier (filed as CELLSJAVA-42583) have been fixed in this update. This message was posted using BugNotificationTool from <a href=“https://#{request.env[“HTTPS_HOST”]}”>Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSJAVA-42583) have been fixed in Aspose.Cells for Java 18.4. Please also see the document for your reference:
https://docs.aspose.com/display/cellsjava/Installation