[gdal-dev] Errors when reading large xlsx files

Dirk Vanden Boer dirk.vdb at gmail.com
Tue Mar 29 00:40:53 PDT 2022


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<size_t>(apoCurLineValues.size() -
        poCurLayer->GetLayerDefn()->GetFieldCount()) >
            static_cast<size_t>(100000 / nFeatureCount) )
{
    CPLError(CE_Failure, CPLE_NotSupported,
                "Adding too many columns to too many "
                "existing features");
    return;
}

The featureCount in my case is 128741
apoCurLineValues.size() = 8
fieldCount = 7

Why is this error reported? Does it impact the actual read data?
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.

Kind regards,
Dirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220329/41136711/attachment.html>


More information about the gdal-dev mailing list