[QGIS-Developer] Loading many Excel-Files in QGIS with correct encoding

Andreas Neumann a.neumann at carto.net
Thu Jul 15 00:11:28 PDT 2021


Hi,

Seems like when I load the same file from the newer .xlsx format then 
the encoding is fine.

Now I need to find a way how to batch-convert all of the many .xls to 
.xlsx files automatically.

Still I find it disturbing that QGIS doesn't allow me to load the older 
.xls files with correct encoding without manual intervention.

Andreas

On 2021-07-15 08:56, Andreas Neumann wrote:

> Hi again,
> 
> I tried to set the layer encoding after the layer merging, but it fails 
> ;-(
> 
> And before the layer merging I cannot set the encoding in the model, 
> because it only accepts a single layer as input, and not multiple 
> layers.
> 
> So it seems that I will have to set the correct encoding right away 
> from the beginning on - but I don't know how.
> 
> Thanks,
> 
> Andreas
> 
> On 2021-07-15 08:33, Andreas Neumann wrote:
> 
>> Hi,
>> 
>> I have a bunch of MS Excel .xls files in the old format (hundreds of 
>> files), not the new .xlsx format.
>> 
>> The content of the .xls files seems to be UTF-8 encoded, but QGIS 
>> loads them with some LATIN-x encoding - all of the 
>> non-ASCII-characters look garbled.
>> 
>> I want to process these files with Processing and merge them into one 
>> file.
>> 
>> Is there any way how I can load these files with the correct UTF-8 
>> encoding? I know, there is an algorithm to set the correct encoding of 
>> a layer in processing, but unfortunately this doesn't work with 
>> multi-layer input, only with single layer input.
>> 
>> Is there some OGR trick (environment variable or opening option) to 
>> load the files with correct encoding?
>> 
>> Thanks if you have any hint,
>> 
>> Andreas
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210715/e3f8a24a/attachment.html>


More information about the QGIS-Developer mailing list