1

I'm developing a function that allows users to upload .xls or .xlsx files to the server and save data from those files into a database.

I'm using openpyxl and xlrd libraries for reading data from Excel, but for some Excel files which contain text in textbook inside shapes, I'm currently unable to read those values.

I know maybe my question is a duplicate of this: Obtain textbox value from Excel in Python but the solution of the asker of that question is not a general solution.

Does any anyone know how to achieve this?

user2905416
  • 404
  • 7
  • 21
  • I reviewed the duplicate, and it looks like it is a very general solution. Perhaps there is something in there to help you develop a better solution. – Bobort Nov 16 '21 at 16:35
  • @Bobort: I've already tried the duplicate question's solution, but when I rename the .xlsx file to .zip file and use zipfile library to read that .zip file, the zipfile library rise an error that the file isn't a zip file (File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/zipfile.py", line 1335, in _RealGetContents raise BadZipFile("File is not a zip file")).I tried rename the file to .zip file manually on windows and then unzip the file and I get exactly the xml files that contain values from textbook but on Mac OS I can't even unzip the file after rename. – user2905416 Nov 17 '21 at 01:52

0 Answers0