Re: [gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Andrew C Aitchison
On Tue, 29 Mar 2022, Dirk Vanden Boer wrote: Scanning through the file, it turns out 2 lines actually have a value in the eight column, that's why the column is present, it doesn't have a header for that column however. So I have 2 questions: - does the error impact the returned data? - Is ther

Re: [gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Even Rouault
Le 29/03/2022 à 20:29, Dirk Vanden Boer a écrit : > The effect will at least be to ignore any rows for which this message was raised - the function is unconditionally exited after the error is raised, before a new feature is added to the current layer. So do I understand correctly that for fi

Re: [gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Dirk Vanden Boer
> The effect will at least be to ignore any rows for which this message was raised - the function is unconditionally exited after the error is raised, before a new feature is added to the current layer. So do I understand correctly that for files containing roughly more than 10 lines, rows tha

Re: [gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Daniel Evans
> does the error impact the returned data? The effect will at least be to ignore any rows for which this message was raised - the function is unconditionally exited after the error is raised, before a new feature is added to the current layer. > Is there a way to suppress this error without disab

Re: [gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Dirk Vanden Boer
Scanning through the file, it turns out 2 lines actually have a value in the eight column, that's why the column is present, it doesn't have a header for that column however. So I have 2 questions: - does the error impact the returned data? - Is there a way to suppress this error without disabling

Re: [gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Daniel Evans
Hi Dirk, > I do notice when I open the file in excel and select everything, the eight column in the file is empty but also gets selected. It looks like that's the key here. The code you identified gets hit if GDAL encounters a row with more populated columns than the previous one, and if the pro

[gdal-dev] Errors when reading large xlsx files

2022-03-29 Thread Dirk Vanden Boer
Hi, When reading xlsx files that contains a lot of lines gdal reports the following error multiple times: | Adding too many columns to too many existing features It comes from the the xlsx driver: GIntBig nFeatureCount = poCurLayer->GetFeatureCount(false); if( nFeatureCount > 0 && static_cast