Forum Discussion

srreddy_goluguri's avatar
srreddy_goluguri
Copper Contributor
Feb 08, 2024

Data in the column automatically converted into general when i save it in CSV

Hai experts,

in the first column when in enter data in excel 01.2020 in order upload to SAP whereas SAP accepts only CSV once i save the file in CSV format it data converted into general and it showed as 1.202 

I am using windows and Ms-Excel current version.

 

Example:-In excel (01.2020 - Text format) after conversion into CSV (1.202) displayed.

 

I seek solution from the experts.

Thanks in advance.

  • Lorenzo's avatar
    Lorenzo
    Feb 11, 2024

    Hi srreddy_goluguri 

     

    It gives desired result when I open in notepad but in case I open CSV file it auto format to general and date and leading zero missing and result would be 1.202 (desired result is 01.2020)

    Well, that's how Excel behaves. Even with the +/- recent addition of the following Options (Excel 365 only, top of my head):

    this won't give you what you expect:

     

    The only option I see is to import the CSV via Power Query and set your 1st column as Text (result attached)

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi srreddy_goluguri 

     

    Running Microsoft® Excel® for Microsoft 365 MSO (Version 2401 Build 16.0.17231.20218) 64-bit / Windows 11 23H2 - Can't repro.:

     

     

    In Excel, cell A1 was formatted as Text before entering 01.2020. File was then saved as CSV (Comma delimited) or CSV UTF-8 (Comma delimited). In both cases when opening the file in a Text editor like Notepad (as above on the right) 01.2020 was maintained

    • srreddy_goluguri's avatar
      srreddy_goluguri
      Copper Contributor
      • haiLorenzo 
        It gives desired result when I open in notepad but in case I open CSV file it auto format to general and date and leading zero missing and result would be 1.202 (desired result is 01.2020)
      • File attached here for more info and if I convert attached file into CSV it will change change text format of date column into general and result is 1.202 instead of 01.2020
      • Lorenzo's avatar
        Lorenzo
        Silver Contributor

        Hi srreddy_goluguri 

         

        It gives desired result when I open in notepad but in case I open CSV file it auto format to general and date and leading zero missing and result would be 1.202 (desired result is 01.2020)

        Well, that's how Excel behaves. Even with the +/- recent addition of the following Options (Excel 365 only, top of my head):

        this won't give you what you expect:

         

        The only option I see is to import the CSV via Power Query and set your 1st column as Text (result attached)

Resources