Issue with CSV Export in Microsoft Excel

Copper Contributor

Hi Team,
I am currently facing an issue with Microsoft Excel.
I have a spreadsheet with column named "Sprint" and values are formatted as text, such as "23.20". When I attempt to save the sheet as a CSV file, the formatting for the "Sprint" column is not being preserved. Specifically, the value "23.20" is being saved as "23.2" which is incorrect because I also have a sprint with name "23.2". I have tried changing the CSV file's column formatting to text, but the issue persists; the value reverts to "23.2" after closing and reopening the file.

I would greatly appreciate your assistance in resolving this issue.

 

7 Replies

Hi @Sonali123456 

 

I don't think there's an issue but suspect you open the CSV with Excel. If instead you open it with a Text editor like Notepad you should see something like:

 

Sample.png

In Excel A2:A5 cells are formatted as Text

Hi @Lorenzo 

Yaah I already tried that, when I open it as notepad or any text editor, I am able to read my actual values.

but my REST API accepts a CSV file (Read the csv file and upload the data in DB) when I try to provide this csv file as input to my API the value getting saved in DB is '23.2' instead of '23.20'

Hi @Sonali123456 

 

So it's not an Excel to CSV issue, it's your API that "tranforms" the values

Do you know if the API would accept, as input, values between simple/double quotes, i.e. '23.20' or "23.20"?

Hi @Lorenzo
it's an issue with Excel to CSV conversion. API reads the value as it is mentioned in the csv file.

Sonali123456_17-1708511046195.png

 

Hi @Sonali123456 

 

Same as my post from ‎Feb 06 2024 01:12 PM - I get what you expect - saved as UTF-8 or "classic" CSV (files attached):

 

sample.png

 

But we might not be on the same page. In Welcome to your Excel discussion space! you're asked to provide Excel version + OS. Except if I missed it, you haven't provided this info. yet

 

Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit / Windows 11 23H2 here

Hi @Lorenzo

Excel version + OS version:
Microsoft® Excel® for Microsoft 365 MSO (Version 2401 Build 16.0.17231.20236) 64-bit / Windows 10 21H2

The issue occurs when the CSV file is opened with Excel instead of a text editor like Notepad.

Hi @Sonali123456 

 

The issue occurs when the CSV file is opened with Excel instead of a text editor like Notepad

This is how Excel behaves when opening CSV. In your scenario where the CSV has to be read by an API I don't see where the issue is, sorry