I am letting the user select an excel worksheet and then I am uploading to server and reading the data to put into a database. I read the data and put into a query.
The problem is the worksheet name. Is there a way that I can get the worksheet name dynamically. If not the user will need to rename the worksheet name every time and they will have to know what to name it. Which can be time consuming and a pain the butt.
Below is the code that I am using:
<cfset myfilepath= #application.UploadPath#>
<!--- Upload Excel File --->
<cfset UploadedFileName = cffile.serverfile>
<cfset myQuery = getExcelSheet("#UploadedFileName#","Sheet1")>
As you can see I am looking for "Sheet1", but I need to be able to get the Worksheet name dynamically so I can get it no matter what the user names it.