Hello!
I am trying to rename a sheet in an excel workbook.
I have uploaded the sheet from the client, and I have saved it as a combination of the userID and a number.
the problem is that I need to rename "Sheet1" or whatever the user named it to something else.
I dont even know where to begin....
Any ideas??
Upload / saved Code:
Sub uploadFile(ByVal source As Object, ByVal e As EventArgs)
Dim mytempdb, TempTable As String
mytempdb = Request.Cookies("APLoad_User").Value.ToString()
TempTable = mytempdb.Remove(mytempdb.LastIndexOf(" "), 1)
If Not IsDBNull(fileToUpload.PostedFile) Then
Try
fileToUpload.PostedFile.SaveAs("d:\inetpub\wwwroot\apload\apload\" + TempTable + ".XLS")
Dim html As String = "<p>File uploaded successfully on the web server</p>"
I am trying to rename a sheet in an excel workbook.
I have uploaded the sheet from the client, and I have saved it as a combination of the userID and a number.
the problem is that I need to rename "Sheet1" or whatever the user named it to something else.
I dont even know where to begin....
Any ideas??
Upload / saved Code:
Sub uploadFile(ByVal source As Object, ByVal e As EventArgs)
Dim mytempdb, TempTable As String
mytempdb = Request.Cookies("APLoad_User").Value.ToString()
TempTable = mytempdb.Remove(mytempdb.LastIndexOf(" "), 1)
If Not IsDBNull(fileToUpload.PostedFile) Then
Try
fileToUpload.PostedFile.SaveAs("d:\inetpub\wwwroot\apload\apload\" + TempTable + ".XLS")
Dim html As String = "<p>File uploaded successfully on the web server</p>"