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

Exporting to CSV using example dynamic table generates single column csv

2 Answers 639 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Waut
Top achievements
Rank 1
Waut asked on 27 Aug 2015, 09:49 AM

Hi

I'm generating a dynamic table and am also exporting this to excel and PDF. Everything is ok when exporting to pdf. But when I try to export to csv, the file is generated as a single column with only the value, no columnheader.

 

So I started with the exampleapplication found at http://www.telerik.com/forums/dynamic-table-in-telerik-reports and altered it so it has and export button to csv. You can find it here: https://www.dropbox.com/s/ibl54sobc9tj6ga/AutoGenerateColumns.zip?dl=0

. The file it generates is also in the csv. Could someone help me with generating a csv with columnheaders and the column and rows like the preview?

2 Answers, 1 is accepted

Sort by
0
Waut
Top achievements
Rank 1
answered on 27 Aug 2015, 09:59 AM

Edit:

When using export to xls, all seems to work fine. Columnheader and values appear in their columns and rows. So perhaps a problem in the export to csv?

0
Nasko
Telerik team
answered on 28 Aug 2015, 03:18 PM
Hello ,

The CSV rendering extension will flatten the data in your report before exporting. This process is the main reason for your data being displayed in a single column. For more information on the topic please refer to the Design Considerations for CSV Rendering help article.
The headers in the CSV file are the names of the report items (not their values). More information on how to turn on/off the headers is available in the Configuring the CSV Rendering Extension KB article.
In case the exported CSV file still does not meet your requirements, then you can export to XLS/XLSX and use the MS Excel built-in Save As CSV functionality.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Waut
Top achievements
Rank 1
Answers by
Waut
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or