Yii2tech/spreadsheet with

Do you know if the mentioned extension should be able to import xls of type X-Document-Type: Worksheet? I’m not sure which Excel version this is related but the file is saved as .xls. Thanks a lot.

Ok, thanks for the info! Do you know if there’s some extension to import such data. Thanks!

No idea. Sorry.

I would like to recommend the direct use of PHPOffice/PhpSpreadsheet without any wrapper. It’s quite straightforward a library, and is well organized and fully documented, so you can easily use it in Yii 2.

It depends on your specific needs, but generally speaking importing takes much more effort than exporting, since the data format is not under the complete control of yours in the former. A spreadsheet can have quite various types of data, e.g., number, currency, string, datetime, and even formula. Moreover cells could be merged. This is why they give up supporting importing in the extensions that utilize PhpSpreadsheet for exporting.

1 Like

Ok, yes that is understandable that importing is more challenging. However, in this case I need to honor only one format (coming from specific client and the format / organization of the document is always the same).

I’ll give this a try, it seems to be anyway the “only” chance.

Yeah, when the format of your target excel files is determined, it is quite easy to retrieve the data from them using PhpSpreadsheet.