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

Auto data formatting on xlsx export

3 Answers 74 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Jesse Mabon
Top achievements
Rank 2
Jesse Mabon asked on 26 Jun 2015, 06:54 PM

Hello,

I upgraded to the latest telerik version yesterday to change my pivot grid excel exporting to use xlsx. Now I’m getting auto formatting of data when it is exported. An example is I have column headers by fiscal year. So a value in the header that is “2006-07” ends up being “7/1/2006“ when it gets to excel. This happens for all my fiscal year column headers. And when I check the cell type in excel its set to Date even though the datatype in the DataTable and PivotGrid is a String. I tried to use the PivotGridCellExporting to possible change this but during that process the values are all correct.
If I change it back to export to xls the column header formats are correct. Is there some setting I can change to fix this issue?

Thanks,
Jesse

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 01 Jul 2015, 04:50 PM
Hello,

The only change we made in the privotgrid xlsx export was related to DateTime column type and String fields should not be affected. However, in order to investigate what is causing the problem on your end we need to test the problematic page locally. Could you please open a support ticket and attach there a sample runnable project which we can debug.

Thank you.

Regards,
Pavlina
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
0
Jesse Mabon
Top achievements
Rank 2
answered on 21 Jul 2015, 05:24 PM

The project i have it running in is massive and i don't have time to create a sample one at the moment. I also found the same issue when exporting from a radgrid. I have a column of Course Numbers with various data. They have dashes in them and look like this: "MTH-101" and such. There is a group of them that look like this: "APR-1104". These cause a DataTime format error when exporting. i imagine it's trying to convert them to April, 4 2011 or something. This field is a String type in the datatable as well as a String type when defining it in the grid column. Yet when being exported to xlsx it is getting converted automatically to a date. If i change it to export to BIFF it exports correctly. So it's not directly related to the pivot or rad grids but the export itself. Hopefully this helps you track down the issue because i would like to use the newer version of xlsx as the export.

Thanks,

Jesse

0
Pavlina
Telerik team
answered on 24 Jul 2015, 04:13 PM
Hello,

May I ask you to provide the problematic grid or pivotgrid declaration so we can try to replicate the described problem locally and investigate the reason behind it.

Regards,
Pavlina
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
PivotGrid
Asked by
Jesse Mabon
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Jesse Mabon
Top achievements
Rank 2
Share this question
or