I&#039;m creating a form that lets customers upload their excel spreadsheet then I read the data of each row & insert them into my database as order lines.. <BR>My question is, I wouldn&#039;t know in advance of how many rows in the spreadsheet so how can I reference the From clause in this SQL statement:<BR>str="Select line,name,qty,code,font,item From [Sheet1$A1:F10] "<BR>Suppose this excel file has 10 order lines from A1 to F10. <BR><BR>Another way to query is based on the table name or range.. I can do this:<BR>str="Select line,name,qty,code,font,item From myorders "<BR>In this case, the table name is "myorders". But not all customers know or would name their tables. How can I deal with this situation?<BR><BR>And lastly, is it possible to validate the required fields or validate the correct datatype from an excel spreadsheet? How can I do that?<BR>Thanks for your help!