Hi, looking for anyone who has managed to insert an XmlMap into an Excel file using XlsIO. I'm wondering if you use CustomXmlPart but it needs to appear as it would when you open Excel with Developer Tools and click on the Source button.
Any help or pointers would be much appreciated. Thanks.
Iain
Hi Lain,
We are currently validating your requirement and will share more details on July 9th, 2024.
Regards,
Atchaya S.
Hi Lain,
Due to the complexity of the issue, we are unable to share details today. We will share details on July 10, 2024.
Regards,
Atchaya S.
Hi Lain,
Currently, XlsiO doesn't support for adding and importing XML files into the worksheet. We have confirmed the issue as "Support for adding and importing XML files into the worksheet" and logged a defect report. We are going to implement this feature. The fix for this issue will be included in our upcoming weekly NuGet release scheduled for July 30, 2024.
You can track the status of the defect report through feedback link.
Regards,
Atchaya S.
Hi Lain,
Sorry for the inconvenience,
Due to Complexity, we will include the fix for this issue in our upcoming weekly NuGet release scheduled for August 06, 2024.
Regards,
Atchaya S.
Hi lain,
We have included the feature for "Support for adding and importing XML
files into the worksheet" in our
volume 3 release version 27.1.48. Kindly upgrade your Syncfusion packages to
this new 27.1.48 version and let us know if the issue is resolved.
UG Link : Import to Excel document | Syncfusion
We are glad to announce that our Essential Studio 2024 Volume 3 release v27.1.48 is rolled out and is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Atchaya S.
Hi Iain Dalgleish ,
We appreciate your patience.
We have included the fix to resolve the issue "Support for adding and importing XML files into the worksheet" in our weekly NuGet release version 26.2.8. Kindly upgrade your Syncfusion packages to this new 26.2.8 version and let us know if the issue is resolved.
NuGet Package: NuGet Gallery | Syncfusion.XlsIO.Net.Core 26.2.8
Note : We provide support for adding and importing XML files into the worksheet, but not for schema files. Please refer the below attached sample and code snippet.
Code Snippet:
Code Snippet for Importing Xml File
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Create();
IWorksheet worksheet = workbook.Worksheets[0];
worksheet.ImportXml(@"../../../Data/XmlFile.xml", 1, 6);
string fileName = @"../../../Output/ImportXml.xlsx";
//Saving the workbook as stream
FileStream stream1 = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream1);
stream1.Dispose();
}
Code Snippet for Add the Xml File
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Create();
IWorksheet worksheet = workbook.Worksheets[0];
workbook.XmlMaps.Add(@"../../../Data/XmlFile.xml");
string fileName = @"../../../Output/Sample1.xlsx";
//Saving the workbook as stream
FileStream stream1 = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream1);
stream1.Dispose();
}
Regards,
Atchaya S.