Read in the file, then issue the appropriate CREATE TABLE commands through your database connection to dynamically create the appropriate columns. Keep a table with metadata on the tables you've created (you really only need the table names, you can issue a DESCRIBE to get everything else, but there may be a bunch of other metadata you'd like to store, like the original file name & format, date uploaded, etc.) Query as normal.
I've been down the row-per-cell route before. It seems to be one of those ideas that everyone comes up with, sounds really clever at first, and is the wrong solution in 99% of cases. Problem is that it's really hard to get efficient querying - almost every query requires a full table scan.