This is a migrated thread and some comments may be shown as answers.

How to remove BOM characters "" from CSV file generated by ReportViewer export to CSV file

3 Answers 355 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Heather
Top achievements
Rank 1
Heather asked on 29 Jan 2013, 08:30 PM
I am using Telerik Reporting version 6.1.12.820, Runtime version:  v2.0.50727

I use ReportViewer to render the reports. If I export  to CSV files when the report is empty, I noticed there are BOM characters "" at the beginning of the file.

How can I remove it?

I searched the forum and found some post in Telerick Radgrid

http://www.telerik.com/community/forums/aspnet-ajax/grid/exporting-without-bom.aspx#1474434


But for ReportViewer, there is no such event handler.

Can you help?

Thanks

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 01 Feb 2013, 05:03 PM
Hello Heather,

Currently it is not possible to remove the BOM character from the CSV stream. Could you, please elaborate on your scenario and let us know what problems does it cause?

Kind regards,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Heather
Top achievements
Rank 1
answered on 04 Feb 2013, 04:34 PM

The problem only happens when the report is empty. Please see attached screen shot.

Sometimes we do generate empty reports based on user's input.

Thanks
0
Steve
Telerik team
answered on 07 Feb 2013, 12:15 PM
Hello Heather,

The BOM character is visible only if you open the CSV in Excel, but not if you open it in a proper text editor (Scite, Notepad++ etc.). Based on this observation and research on this matter shows that this is considered a bug in MS Excel. In short you have a couple of options:
  • do not use Excel to open CSV files.
  • check whether your data source has data and cancel the export to CSV if no data.

Greetings,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Heather
Top achievements
Rank 1
Answers by
Stef
Telerik team
Heather
Top achievements
Rank 1
Steve
Telerik team
Share this question
or