Bug 135000 - FILEOPEN: CSV: boolean import option
Summary: FILEOPEN: CSV: boolean import option
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
 
Reported: 2020-07-21 06:12 UTC by Maarten Brouwers
Modified: 2021-05-31 14:27 UTC (History)
2 users (show)

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 Maarten Brouwers 2020-07-21 06:12:59 UTC
Suggestion to introduce a 'Boolean' column type (among Text, Date) which interprets "true" and "1" (unquoted) as =TRUE() and "false" and "0" as =FALSE()
Comment 1 Eike Rathke 2021-01-26 12:30:43 UTC
Fwiw, one already gets that for true and false if in the import dialog "Detect special numbers" is activated, which then imports them as 1 and 0 formatted with BOOLEAN to TRUE and FALSE. Columns with numeric values (e.g. 1 or 0) can always be assigned the BOOLEAN number format after import.

I don't know if we would gain much with an explicit Boolean column type, though it might be nice in some circumstances. Note however that forcing to Boolean could hide values other than 0 or 1 because any numeric value other than 0 is formatted to TRUE. Of course the import could not apply the BOOLEAN format for other values to make them stand out, ending up with a column of mixed types again.
Comment 2 Heiko Tietze 2021-01-26 13:35:31 UTC
If I switch the number format in Format Cells > Numbers > Category  to Boolean Value I get the localized forms of true/false. 

What's your use case, Maarten?
Comment 3 Maarten Brouwers 2021-05-31 14:27:32 UTC
Hi Heiko, I missed the follow up question. My use case was probably solved by Eike Rathke's suggestion, but it might have required some additional preparation. I still think that 'Detect special numbers' is not a flag I'd expect to have any effect on True/False recognition. Also recognizing 'true' and 'false' as values as TRUE() and FALSE() respectively would be a nice addition (perhaps even with localized versions such as "Yes/No", "Ja/Nee", "Si/Non"... etc.)