Bug 152053 - Calc opens CSV with narrow column so cannot read the date
Summary: Calc opens CSV with narrow column so cannot read the date
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-15 13:36 UTC by Jonny Grant
Modified: 2022-11-21 13:09 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
calc.csv example (23 bytes, text/csv)
2022-11-15 13:37 UTC, Jonny Grant
Details
Screenshot showing the issue when opening the CSV file (59.02 KB, image/png)
2022-11-15 13:37 UTC, Jonny Grant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonny Grant 2022-11-15 13:36:43 UTC
Calc opens CSV with narrow column so cannot read the date. Users need to manually resize the Date column.
the fields are correctly detected as dates, Calc should set appropriate column width
Comment 1 Jonny Grant 2022-11-15 13:37:12 UTC
Created attachment 183607 [details]
calc.csv example
Comment 2 Jonny Grant 2022-11-15 13:37:36 UTC
Created attachment 183608 [details]
Screenshot showing the issue when opening the CSV file
Comment 3 Eike Rathke 2022-11-15 17:00:10 UTC
Note that whether that string 29/12/20 is recognized as date is locale dependent, in a locale where it is not recognized as date it is imported as text and the cell width is correctly adjusted. Use 2020-12-29 instead.
Comment 4 Commit Notification 2022-11-15 18:56:23 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8309f94001ec29faff288cb8f920ee00978bb85a

Resolves: tdf#152053 GetOptimalColWidth() obtain number format from next row

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Eike Rathke 2022-11-15 18:58:52 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/142687 for 7-4
Comment 6 Jonny Grant 2022-11-15 21:05:59 UTC
Amazing Eike!
Comment 7 Commit Notification 2022-11-17 16:22:30 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/6fb437e6cef4ca402e81ee8037f361a4de911549

Resolves: tdf#152053 GetOptimalColWidth() obtain number format from next row

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Stéphane Guillou (stragu) 2022-11-18 16:48:35 UTC Comment hidden (obsolete)
Comment 9 Stéphane Guillou (stragu) 2022-11-18 16:49:28 UTC
(Sorry for the misspelling!)

Thanks Eike, verified as fixed in:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 45d1fca81991f0d6837c98d6be6fe0d21d566fa5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 10 Commit Notification 2022-11-21 13:09:09 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9e4b47190eb762f3aea80920846fe5135b7d76fc

tdf#152053: sc_subsequent_filters_test2: Add unittest

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.