Auto data formatting on xlsx export

4 posts, 0 answers
  1. Jesse Mabon
    Jesse Mabon avatar
    2 posts
    Member since:
    Jan 2007

    Posted 26 Jun 2015 Link to this post

    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

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 01 Jul 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jesse Mabon
    Jesse Mabon avatar
    2 posts
    Member since:
    Jan 2007

    Posted 21 Jul 2015 in reply to Pavlina Link to this post

    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

  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 24 Jul 2015 Link to this post

    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
Back to Top