CSV to XLS with decimals

SEO

New Member
Joined
Feb 2, 2010
Messages
10
Hi there!

I got a bunch of data stored in a CSV format, where some of the values are decimal values (two decimals). When I convert this into XLS something strange happens. When the first two digits (before the . and the decimals) are from 1 to 12 the XLS document doesnt display the number, it displays it as a date. I have checked that all my cells are formatted to general, and also tried to format them to scientific with 2 decimals and number with 2 decimals, none of which helps :confused: Any idea how to fix this?

(not surprisingly) the values without decimals remains as they wore in the CSV format.

Help will be greatly appreciated!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How are you converting your CSV file to Excel?
Are you simply opening the CSV file directly in Excel?
I would not recommend doing that, as Excel will try to "guess" the format of each cell, and could guess wrong, like you are experiencing.

Rather, import the CSV file into Excel instead (Get External Data -> Text). This will invoke the Import Wizard, where YOU can specify the format of each column.
 
Upvote 0
When I open the CSV document in Excel, all the data gathers in cell A1, so I then use the "text to column" feature to allocate the correct values to the correct cells.

I tried the "get external data" procedure now, but it results in the same wizard as the "text to column" feature, and hence I get the same problem with the dates.
 
Upvote 0
When you are performing the steps of the Text to Columns wizard, or the Import Wizard, are you specifically going through and specifying the format of each and every data field?
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,924
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top