Issue 14974 - Date processing is iffy on imported files using =sumif()
Summary: Date processing is iffy on imported files using =sumif()
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
URL:
Keywords:
: 14975 14976 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-05-27 17:05 UTC by lduperval
Modified: 2013-08-07 15:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Problematic spreadsheet (32.10 KB, application/octet-stream)
2003-05-28 12:19 UTC, lduperval
no flags Details
Associated data imported (18.66 KB, text/plain)
2003-05-28 12:20 UTC, lduperval
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description lduperval 2003-05-27 17:05:42 UTC
I've got some data that is exported from a database and which I import in a
spreadsheet. I'm using the sumif() function to do calculations based on date
values and for some reason, my file does not recognize dates as being the same.
For example, in the attached file, Calc never recognises the dates after April
27, even if the date is cut and pasted from the cell in column A.

I'm attaching the faulty document and the imported CSV file.
Comment 1 lduperval 2003-05-27 17:58:41 UTC
Hmm, turns out to be a partial user error. On top of that, I had
problems with my browser so I posted it three times.
Comment 2 daniel.rentz 2003-05-28 06:45:34 UTC
closed
Comment 3 daniel.rentz 2003-05-28 06:45:56 UTC
*** Issue 14975 has been marked as a duplicate of this issue. ***
Comment 4 daniel.rentz 2003-05-28 06:46:27 UTC
*** Issue 14976 has been marked as a duplicate of this issue. ***
Comment 5 lduperval 2003-05-28 12:18:09 UTC
Ok, I worked the data again and I saw the problem once again. I'm
attaching the file.

I also corrected the version number.
Comment 6 lduperval 2003-05-28 12:19:29 UTC
Created attachment 6488 [details]
Problematic spreadsheet
Comment 7 lduperval 2003-05-28 12:20:11 UTC
Created attachment 6489 [details]
Associated data imported
Comment 8 lduperval 2003-05-28 12:35:37 UTC
You can see the problem on the April tab. You can also try this:

- Import the data and specify that the format of the first column is YMD
- Paste the data for April in sheet "Apr 03"
- You will notice a bunch of Err.503
- Copy the content of cell A2 to F2. The data in G2 is now correct as
well as the data in D2 to D20
- Using the black square in cell F2, drag to F31.
- Only the first 5 entries are now correct
- Copy the cell from A96 to F7. G7 is now correct
- Drag cell F7 to F31
- Now all data is correct

If you reimport the data file, you will have to repeat the same steps,
which is illogical (to me, anyway).
Comment 9 frank 2003-05-30 10:43:51 UTC
Hi,

this problem is caused by a different date setting. If you give A2 and
F2 the default format, you will see that in both cases the numbers get
decimal places. The pasted ones are slightly different, so the they do
not match and the result of the sumif in column G is zero. Therefore
the calculation in column D do an Division by Zero resulting in Error 503.

So we have two bugs :

1.) The import of CSV date data should not set any decimal, just the
integer except a time is given in the file.

2.) make sure you get the correct data to compare. Will say if date
without time is set as format, just use the integer part to compare.

Best regards

Frank
Comment 10 frank 2003-05-30 10:44:38 UTC
set the Target and some more flags.
Comment 11 daniel.rentz 2003-06-02 09:48:02 UTC
DR->ER: CSV import and number formats -> your issue.
Comment 12 niklas.nebel 2003-06-02 13:25:09 UTC
A date value must be imported without a fractional value. It was
handled that way in 1.0, so this has to be fixed before the 1.1 release.
The SUMIF formula doesn't care about the cell's format and uses the
full value. This won't be changed.
Comment 13 niklas.nebel 2003-06-02 13:25:26 UTC
started
Comment 14 ooo 2003-06-02 16:11:46 UTC
Fix reviewed
Comment 15 niklas.nebel 2003-06-02 16:13:28 UTC
Fixed in CWS calc 13 (sc/source/ui/docshell/impex.cxx 1.24.28.1), will
be in 1.1 RC.
Comment 16 niklas.nebel 2003-06-03 17:42:18 UTC
Back to QA for verification.
Comment 17 frank 2003-06-04 09:12:25 UTC
reset to fixed
Comment 18 frank 2003-06-04 09:13:22 UTC
found fixed on cws Calc13 using solaris and windows
Comment 19 frank 2003-06-04 09:14:05 UTC
Grrr, forgot to set the verified flag
Comment 20 frank 2003-06-10 14:28:33 UTC
found integrated using srx645m4s2 on Linux, Solaris and Windows