Forum Discussion

Flikkery's avatar
Flikkery
Copper Contributor
Jun 19, 2020

Formatting CSV numeric values

I created a CSV file with a twelve numeric value id (as in a Medicaid Id).  The Excel sheet converts this 12 digit number into a 1E+11 format.  Is there a way to prevent this?

11 Replies

  • Bennadeau's avatar
    Bennadeau
    Iron Contributor

    Hi Flikkery ,

    You can try formatting your cell as text.

    Right click > Format Cells... > under "Number" tab, select "Text"

    I don't think this will convert to the full 12 digits view if it has already been converted to "1E+11" but if you re-input the data it should stick.

     

    Ben

    • Flikkery's avatar
      Flikkery
      Copper Contributor

      Bennadeau The end user has to format the column the way you suggested, formatting the cell with a "Custom" format, and replacing the "General" with twelve zeroes.  This works, however, as an IT department furnishing the Excelsheet, we want to circumvent the user from formatting the column.

      • Maverick494's avatar
        Maverick494
        Copper Contributor

        The thing is that what you are talking about isn't a CSV formatting issue, it is an excel display issue.  Excel automatically makes those numbers into sci format.  There is nothing you can change in excel to change that when you send a file.  It is all about the User and they would have to change the format.

        If you want to control the format and lock the workbook you would have to turn the CSV into an excel file and do all the number formatting and then lock the sheet so the end user doesn't have to do it.

        Keep in mind all a csv file is, is a text file that excel recognizes commas as a way to make a column.
         Flikkery 

Resources