Bug 151750 - SUMs wrong in Calc
Summary: SUMs wrong in Calc
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.1.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-25 12:44 UTC by Ian
Modified: 2022-10-25 21:30 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Calc spreadsheet with wrong SUMs. (24.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-10-25 12:44 UTC, Ian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian 2022-10-25 12:44:53 UTC
Created attachment 183257 [details]
Calc spreadsheet with wrong SUMs.

Two problems:
First:
I have German as the default language for Calc.
When I SUM a column of numbers with a comma as the decimal marker it produces what seems to be a random number.
When I convert the numbers to English (UK), and replace the commas with a full point, the SUM Calc produces is the same as those Google Sheets produces. But not always - See Column 1 and 2

Electricity	Gas			
20.2	28.2		20.2	28.2
11.5	9.6		11.5	9.6
17.6	14.7		17.6	14.7
0.0	0.0		0.0	0.0
9.3	8.0		9.3	8.0
0.0	0.0		0.0	0.0
4.7	5.0		4.7	5.0
13.6	11.3		13.6	11.3
2.7	2.7		2.7	2.7
2.1	2.2		2.1	2.2
5.1	4.6		5.1	4.6
10.8	11.1		10.8	11.1
0.0	0.0		0.0	0.0
0.0	0.0		0.0	0.0
1.0	0.0		1.0	0.0
1.6	1.5		1.6	1.5
1.0	13.0		100.2	98.9

Second:
When I have copied and pasted columns of numbers from, say a CSV file, into CALC, CALC sometimes leaves off the Zero from a number like 10 or 60 or 890.
Why would it drop the last zero at all, but not a 1 to 9 number?

Many thanks for your help.

Ian

PS I'm using Libre Office ver 7.3.1.3 (x64) on a Windows 10 Build 19043 machine.
Comment 1 m_a_riosv 2022-10-25 21:30:11 UTC
You need to import properly the csv.

When copy use unformatted text option (arrow on the right of paste button) or use Menu/Edit/Paste special
Tow ways:
1 - Selecting as language one with dot as decimal separator, like English (UK or US).
2 - Select all columns, by clicking in the top left corner, and selecting in the 'column type' box 'US English'.

Please when you have this kind of question ask first search in https://ask.libreoffice.org/ and if you don't find any answer do your question there.