Bug 158432 - CSV IMPORT: add option to keep (not overwrite) target cell formatting
Summary: CSV IMPORT: add option to keep (not overwrite) target cell formatting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://forumooo.ru/index.php?topic=1...
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Import
  Show dependency treegraph
 
Reported: 2023-11-29 06:45 UTC by Mike Kaganski
Modified: 2025-01-28 20:20 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 Mike Kaganski 2023-11-29 06:45:56 UTC
CSV filter applies formatting to imported cells. E.g., it may set column widths and number formats.

It might be useful to avoid changes of formatting in cases when a user has some pre-formatted range, and pastes a CSV there, e.g. using

> FilterName="Text - txt - csv (StarCalc)"
> FilterOptions="44,34,76,1,,1037"
> ThisComponent.AreaLinks.insertAtPosition(address,url,source,filter,options)

The 'options' could make use of a new option to avoid change of the target format. So that the CSV import filter does all the processing of the data in the file, recognizes it according to the normal rules (as defined in the filter - e.g., detects special numbers or not; uses fixed widths of separators; considers E-notation as numbers or strings ...), but when putting it to the cells on sheet, it would only put data, not formats (so e.g. recognized dates could possibly appear as numbers - it would be OK).
Comment 1 Roman Kuznetsov 2025-01-28 20:19:55 UTC
Set to NEW, it would be cool