PHPOffice / PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files
https://phpspreadsheet.readthedocs.io
MIT License
13.34k stars 3.47k forks source link

Some missing data with MS Excel Power Query #3119

Open mserramanxa opened 2 years ago

mserramanxa commented 2 years ago

This is a bug report

What is the expected behavior?

Import data using MS Excel Power Query correctly.

What is the current behavior?

I lose some data when importi with MS Excel Power Query

What are the steps to reproduce?

I'm using de 01simple.xls (https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/Basic/01_Simple.php)

The steps:

1.- open excel (tested on 2019 and 365) with a new blank spreadsheet 2.- goto: data -> get data -> from file -> from excel file 3.- select 01simple.xls 4.- in data preview you only see two cells with text image

5.- the same when you finishes de wizard ... image

If you opens the file normally, you see some more data ... image

Additional info: If you opens the xls simple normaly with excel, saves it (no making changes) and try to import as described on steps from 2 to 5, works well, no missing text. If you have the xls opened and follow the steps from 2 to 5, works well, no missing text.

Which versions of PhpSpreadsheet and PHP are affected?

1.25.2

mserramanxa commented 2 years ago

I not sure if this can help but ...

If I try to get data in MS Excel Power Query from an XLSX file, works as expected, XLS not.

Output of file command for each file ...

$ file 01_Simple.xls
01_Simple.xls: Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Title: PhpSpreadsheet Test Document, Subject: PhpSpreadsheet Test Document, Author: Maarten Balliauw, Keywords: office PhpSpreadsheet php, Comments: Test document for PhpSpreadsheet, generated using PHP classes., Last Saved By: Maarten Balliauw, Create Time/Date: Thu Oct 13 12:11:38 2022, Last Saved Time/Date: Thu Oct 13 12:11:38 2022, Security: 0

$ file 01_Simple.xlsx
01_Simple.xlsx: Microsoft Excel 2007+