Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic sheet names when querying excel????

Status
Not open for further replies.

rtgordon

Programmer
Jan 17, 2001
104
US
I currently have a process that allows the user to upload an excel spreadsheet. The page queries the file, and uploads to the database. Currently, I am telling the users to verify that the sheet name matches the file name, then querying like:

Code:
Set objExcelRS = objExcelConn.Execute("Select * From [" & Mid(OriginalFileName, 1, Len(OriginalFileName) - 4) & "$]")

The problem is that I can't always count on this to happen...

What I direly need is a way to get the sheetname dynamically when the file is uploaded or a suggestion about how to go about tackling this issue.

Any help is appreciated.
Thanks,
gordon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top