Cannot Import Excel (.xlsx) File to Data Table

What I’m trying to do:
Resolve this error:
anvil.tables.TableError: Cannot store NaN in a data table

What I’ve tried and what’s not working:
I’ve run through the tutorial here (Anvil Docs | CSV and Excel import), and followed all of the steps, but I am still getting a NaN error.

Code Sample:



Clone link:
https://anvil.works/build#clone:47HEWUPPDYDPOUY7=GBIDO5VBC4COLD2VN4LH2J7Q

That error suggests you have a row in your csv/excel file where one of the columns is empty.

You can fix that in the source file before loading it or do some processing afterwards to identify any missing values and either reject them or convert them as you need.

2 Likes