csv - Why does Excel parse numbers with more than two decimal places as whole numbers? -
excel uses windows regional settings list separator , decimal separator csv files. attempting localize csv reports in our application french , german users. using semi-colons csv delimiter , commas decimal separators french , german versions of each csv.
i've set local windows regional settings use semi colons , commas decimal separators. when open following test file in excel, excel parses numbers 2 or less decimal characters correctly ... based on regional settings. however, numbers 3 or more decimal places parsed whole numbers. so, string 12,3000 parsed 123 000 (one hundred twenty 3 thousand).
test.csv:
"decimal separator";"in quotes";"number" "period";"false";4.283333 "period";"true";"4.283333" "period";"false";0.283333 "period";"true";"0.283333" "comma";"false";4,283333 "comma";"true";"4,283333" "comma";"false";0,283333 "comma";"true";"0,283333" "period";"false";4.333 "period";"true";"4.333" "period";"false";0.333 "period";"true";"0.333" "comma";"false";4,333 "comma";"true";"4,333" "comma";"false";0,333 "comma";"true";"0,333" "period";"false";4.28 "period";"true";"4.28" "period";"false";0.28 "period";"true";"0.28" "comma";"false";4,28 "comma";"true";"4,28" "comma";"false";0,28 "comma";"true";"0,28" "period";"false";4.4 "period";"true";"4.4" "period";"false";0.4 "period";"true";"0.4" "comma";"false";4,4 "comma";"true";"4,4" "comma";"false";0,4 "comma";"true";"0,4" "period";"false";4 "period";"true";"4" "period";"false";0 "period";"true";"0" "comma";"false";4 "comma";"true";"4" "comma";"false";0 "comma";"true";"0" "period";"false";45623455454.283333 "period";"true";"45623455454.283333" "period";"false";45623455450.283333 "period";"true";"45623455450.283333" "comma";"false";45623455454,283333 "comma";"true";"45623455454,283333" "comma";"false";45623455450,283333 "comma";"true";"45623455450,283333" "period";"false";45623455454.28 "period";"true";"45623455454.28" "period";"false";45623455450.28 "period";"true";"45623455450.28" "comma";"false";45623455454,28 "comma";"true";"45623455454,28" "comma";"false";45623455450,28 "comma";"true";"45623455450,28"
does have insight on this
you might have issue if regional settings set use comma "digit grouping symbol". french uses space character digit grouping , germany uses period.
windows --> control panel --> region , language --> numbers --> additional settings --> digit grouping symbol --> set use space character
Comments
Post a Comment