Completed
Last Updated: 23 Feb 2018 16:11 by ADMIN
Severin
Created on: 07 Apr 2016 17:50
Type: Feature Request
3
Rendering to XLSX should not add BOM to XML files
The report processor renders a report to XLSX format and adds a BOM (EF BB BF) to every embedded XML file. This is causing some open source libraries to fail to load the XLSX file, which is an issue for some of our customers.

var deviceInfo = new System.Collections.Hashtable();
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
var result = reportProcessor.RenderReport("XLSX", instanceReportSource, deviceInfo);

The work-around is to load the XLSX file in Excel (which apparently ignores the BOM) and then save it (which removes the BOM).

I have read that the BOM is optional (and undesirable for compatibility) for UTF-8 encoded files, which is how the report processor renders XLSX.

Please remove the BOM, or add a Device Info setting "WriteBOM = true/false", similar to the CSV export device info.

Thanks, much appreciated!
3 comments
ADMIN
Milen | Product Manager @DX
Posted on: 23 Feb 2018 16:09
Hi. This is now fixed from the respective team (thank you!): https://github.com/OfficeDev/Open-XML-SDK/pull/381

The fix is available since version 2.8.0.0 of their library (verified from our team): https://www.nuget.org/packages/DocumentFormat.OpenXml/2.8.0
ADMIN
Milen | Product Manager @DX
Posted on: 01 Dec 2017 16:39
Hi. To render XLSX documents (and the rest of the Open Office XML formats we support) we use the https://github.com/OfficeDev/Open-XML-SDK library. Unfortunatelly, after reviewing their code, indeed they leave the default XML settings for each of the document parts. By default, the used encoding outputs BOM prefix. We will log an issue in their project and do our best to influence its resolution. It will be of great help if you can specify concrete editors that cannot open the produced document because of the BOM prefix. Thank you for your input. EDIT: Logged into the lib in question: https://github.com/OfficeDev/Open-XML-SDK/issues/309
Isaac
Posted on: 20 Jun 2017 15:37
I think this is likely the same issue that is causing the xlsx files to fail in Apple Numbers:
https://feedback.telerik.com/Project/162/Feedback/Details/195698-apple-numbers-reporting-support