mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
Spreadsheet: Show the error (if any) in csv import dialog's preview
...and don't try to read from a CSV that has errors. Fixes #5942.
This commit is contained in:
parent
bbf6847d50
commit
102065a8a9
6 changed files with 43 additions and 14 deletions
|
@ -105,6 +105,8 @@ Vector<XSV::Field> XSV::read_row(bool header_row)
|
|||
|
||||
if (!header_row && (m_behaviours & ParserBehaviour::ReadHeaders) != ParserBehaviour::None && row.size() != m_names.size())
|
||||
set_error(ReadError::NonConformingColumnCount);
|
||||
else if (!header_row && !has_explicit_headers() && !m_rows.is_empty() && m_rows.first().size() != row.size())
|
||||
set_error(ReadError::NonConformingColumnCount);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue