dbzhang800 / QtXlsxWriter

.xlsx file reader and writer for Qt5
http://qtxlsx.debao.me
Other
1.24k stars 631 forks source link

How to read a exist xslx file which was created manually? #200

Closed XiaotongGao closed 4 years ago

XiaotongGao commented 4 years ago

Hi,

How can I read a exist xslx file that was created manually? I tried to read a existed xslx file but I neither can't get the sheet names by the function sheetNames nor get any data by function read

VSRonin commented 4 years ago

See this example: https://github.com/dbzhang800/QtXlsxWriter/blob/master/examples/xlsx/extractdata/main.cpp

XiaotongGao commented 4 years ago

Thx, but this example is not my wanted, the file 'Book1.xlsx' in the example was created by 'Xlsx' module other than created by Excel software manually. It will doesn't work if you read a xlsx file created by Excel software.

VSRonin commented 4 years ago

It does, this library is used in many projects for that. Are you sure that the file coming from excel is in xlsx format and not xls?

In any case, if you are starting a new project and not maintaining an old one I recommend switching to https://github.com/QtExcel/QXlsx as this library is currently unmaintained

XiaotongGao commented 4 years ago

I have switched to the https://github.com/QtExcel/QXlsx and the issue not exists in this library. Thx.