Why is my spreadsheet (.xlsx) empty?

2019-09-04 21:25发布

For the original problem, see Looping through .xlsx files using pandas, only does first file.

After some tinkering, I realized Python was claiming my spreadsheets (.xlsx) were empty, with one exception. The files are nearly empty as most have somewhere between 1 and 5 entries, while the one Python found and wrote to my final file is probably the largest with 12 entries.

I used a glob.glob to find my files, and this is successful as I verified it with a print command. So, it knows the files are there. Furthermore, after putting all the data into a dict and printing it, I discovered Python is even pulling out the headers, but it states "Empty DataFrame" where the data should be.

Does anyone know why this would happen? I did verify the contents of these files.

EDIT:

I realized the data in the .XLSX files that cannot be read by Python are all in the following format:

="xyz"

However, in the file that can be read, the data are presented in the standard Excel format, just strings and numbers. The files/data came to me like this, so it would seem I have a new question again, namely, "How do I convert Excel data from the format ="xyz" to simply xyz? Is there a "paste values" function within Python/pandas as there is in excel?" I will post the new question and link to it if I can't figure this out. I'll see if I can pull out the strings.

标签: python excel
0条回答
登录 后发表回答