Forum Discussion

Ryno1009's avatar
Ryno1009
Copper Contributor
Nov 28, 2022

Cell format changes

Good day

I have a problem with excel changing cell format from General to Custom from a specific line number when exporting a report into excel. The data that is being exported is fine from the first line to line 29, but from line 30 it changes the cell format to custom and therefor the result is I get dates instead of the numbers exported from that line down. As per the attached image, the column on the right is where it changes. What could be the cause of this?

 

Any help would be greatly appreciated.

Kind Regards

Ryno

 

5 Replies

  • Ryno1009 

    Excel always tries to interpret a value as a date, if possible, even if that was not your intention.

    Excel cannot handle dates before the year 1900, so for example 1893-2 is treated as a text value, and hence left-aligned by default.

    But it interprets 1900-2 as a date (the first of February, 1900), so it changes the format to a date format and right-aligns the value.

    How to prevent that depends on what kind of file you're importing in Excel.

    • Ryno1009's avatar
      Ryno1009
      Copper Contributor

      HansVogelaar thank you for your response. It is a report on a ERP system that is exported as csv. On other computers it exports perfectly fine but this specific one it does not. Is there a setting I can change so that Excel can read all numbers as text as a default perhaps?

      Kind Regards

      Ryno

      • JoeUser2004's avatar
        JoeUser2004
        Bronze Contributor

        Ryno1009 

         

        And there is no need to change the file extension to ".txt" first.

         

        Simply click Data > From Text to open the Import Text File dialog box.

Resources