mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
Spreadsheet: Make the CSV reader more lenient
This adds an option "Lenient" that makes the reader conform to what appears to be the norm in spreadsheet-land: - Treat missing values as empty ones - Update previously read rows if another row with more columns are seen afterwards
This commit is contained in:
parent
102065a8a9
commit
894bfa30a2
3 changed files with 28 additions and 5 deletions
|
@ -158,7 +158,7 @@ auto CSVImportDialogPage::make_reader() -> Optional<Reader::XSV>
|
|||
quote_escape,
|
||||
};
|
||||
|
||||
auto behaviours = Reader::default_behaviours();
|
||||
auto behaviours = Reader::default_behaviours() | Reader::ParserBehaviour::Lenient;
|
||||
|
||||
if (should_read_headers)
|
||||
behaviours = behaviours | Reader::ParserBehaviour::ReadHeaders;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue