Repository navigation
Fork Sync Branch 19.0 - #17
Merged
Merged
Conversation
…, and every row of a csv Importing an xls with a sheet mapping has been failing since the split was introduced: the xlrd branch of split_base64_excel builds the (workbook, sheet) tuple but never reads the rows, so `all_rows` is left unbound and the method dies on `if not all_rows` before anything is imported. The branch that was meant to cover it could not work either. It delegated to `super().parse_header()`, a method no module defines -- the sheet parser has one per format, `parse_header_csv`, `parse_header_xls` and `parse_header_xlsx` -- and it handed `_parse_rows` a two-value tuple where it unpacks three. Past that, it assigned the parsed statement lines to `all_rows`, which the split below writes out as if they were the rows of the file. So the xlrd branch now reads the rows the way the openpyxl one does, plain values of every row and every column, and that dead branch goes away with the two variables only it used. The header is parsed the same way for the three formats, from the rows already read. The csv branch read its rows differently from the other two: it dropped the empty ones before the split. That shifted every line number below them, so a mapping whose header row number is 2 found the header on the second *non empty* line instead of the second line of the file, and a statement with a blank line above the header failed with `'Date' is not in list` -- while the same file as xlsx imported fine. It now keeps every row, like the other two branches; empty rows are the parser's business, through skip_empty_lines. Change note: cuando el importador de extractos corre en segundo plano, un archivo .xls ya no falla, y un .csv cuenta el numero de fila de la cabecera sobre las lineas que el archivo realmente tiene, igual que un Excel. Antes, una linea en blanco arriba de la cabecera corria la cuenta y la importacion fallaba con "'Date' is not in list". closes #447 Signed-off-by: Camila Vives <cav@adhoc.inc>
sireko
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.