SOLVED

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

Copper Contributor

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.

5 Replies

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.:

 

Sample.png

 

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

  • hai@Lorenzo 
    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
best response confirmed by srreddy_goluguri (Copper Contributor)
Solution

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):

Untitled.png

this won't give you what you expect:

Sample.png

 

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

Hai@Lorenzo 

Thanks a lot, your solution almost solved the problem.

Hi @srreddy_goluguri 

Not sure what you talk about (Excel options of Power Query) but you're welcome & Thanks for providing feedback

1 best response

Accepted Solutions
best response confirmed by srreddy_goluguri (Copper Contributor)
Solution

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):

Untitled.png

this won't give you what you expect:

Sample.png

 

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

View solution in original post