Bug 122909 - V 6.0.7 or earlier: After opening a CSV file in Cal, all cells appear to be text, but cannot Format $xx.xx Cells to US Currency
Summary: V 6.0.7 or earlier: After opening a CSV file in Cal, all cells appear to be t...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-23 20:25 UTC by Dale Nordby
Modified: 2019-01-23 20:55 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Nordby 2019-01-23 20:25:51 UTC
Description:
After opening a CSV file with CALC, tried to perform calculations example: =sum(c2:c134) the result is 0. Cells in range appear to be text, but with no apostrophe in front of the US currency value. After trying to Format Cells to Currency, all the cells in the range now have an apostrophe inserted! After manually removing the apostrophes, then the cells behave as numbers/currency.

Steps to Reproduce:
1.With Calc, open CSV file containing column of numbers (US currency)
2.Attempt to calculated sum of cells. [Cells are apparently test format.]
3.Format cells to US Currency
4.Look at cell content and note that each has an embedded "'" apostrophe, indicating that they are  text!!!

Actual Results:
Cannot format apparently text cells to number, even though the cell content appears to be a number, except the Format Cells Currency has added an apostrophe ' designating the cell as text!!!

Expected Results:
Should be able to calculate.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Mike Kaganski 2019-01-23 20:55:50 UTC
This is normal, and indicates that you haven't set import options such that it would detect special numbers (like currency). You either need to select proper options at import (first of them is the said "Detect special numbers", and it might be also necessary to tweak columns if their formatting does not conform to your locale's conventions), or after such import, when all the data is text, use Data->Text to Columns. *Formatting* already existing data will never change its data type, and only can alter visual representation (if applicable).

See also this FAQ: https://wiki.documentfoundation.org/Faq/Calc/How_to_convert_number_text_to_numeric_data (there another way to convert is explained, using Find & Replace, but personally I prefer Data->Text to Columns).

Closing NOTABUG.