J
Jimmy Jose
Hi,
I am trying to open an existing excel workbook. It pops up an error
stating that
“Errors were detected in 1598.xls but Microsoft Office Excel was able to
open the file by making the repairs listed below. Save the file to make these
repairs permanent.†‘Renamed invalid sheet name.’“
This message is popped up when the XLS file has work sheet with the name
like rpt:coursedetails etc.,
When trying to open this workbook, programmatically in VB.Net, the following
exception is raised:
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in ExcelObjetCreation.exe
Additional information: Exception from HRESULT: 0x800A03EC.
Could you please tell me how this exception can be handled?
DO THERE IS ANY WAY
The code that i have written to open a currepted file is as below
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xlApp As New Excel.Application
Dim xlworkBook As Workbook
Dim xlSheet As Worksheet
Dim ExcelFile_Path As String = "C:\XLReports\913.xls"
xlApp = CreateObject("Excel.Application")
xlSheet = xlApp.ActiveSheet()
MsgBox(xlSheet.Name)
xlworkBook = xlApp.Workbooks.Open(ExcelFile_Path)
MsgBox(xlworkBook.Name)
xlSheet = xlworkBook.Sheets(1)
MsgBox(xlSheet.Name)
xlSheet.Name = "Mysheet"
MsgBox(xlSheet.Name)
End Sub
I get an error at the following code
xlworkBook = xlApp.Workbooks.Open(ExcelFile_Path)
I feel like that its not possible to open a workbook which has a corrupted
sheetname.
How do microsoft open such file and ask for renaming it,and rename it?
I am trying to open an existing excel workbook. It pops up an error
stating that
“Errors were detected in 1598.xls but Microsoft Office Excel was able to
open the file by making the repairs listed below. Save the file to make these
repairs permanent.†‘Renamed invalid sheet name.’“
This message is popped up when the XLS file has work sheet with the name
like rpt:coursedetails etc.,
When trying to open this workbook, programmatically in VB.Net, the following
exception is raised:
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in ExcelObjetCreation.exe
Additional information: Exception from HRESULT: 0x800A03EC.
Could you please tell me how this exception can be handled?
DO THERE IS ANY WAY
The code that i have written to open a currepted file is as below
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xlApp As New Excel.Application
Dim xlworkBook As Workbook
Dim xlSheet As Worksheet
Dim ExcelFile_Path As String = "C:\XLReports\913.xls"
xlApp = CreateObject("Excel.Application")
xlSheet = xlApp.ActiveSheet()
MsgBox(xlSheet.Name)
xlworkBook = xlApp.Workbooks.Open(ExcelFile_Path)
MsgBox(xlworkBook.Name)
xlSheet = xlworkBook.Sheets(1)
MsgBox(xlSheet.Name)
xlSheet.Name = "Mysheet"
MsgBox(xlSheet.Name)
End Sub
I get an error at the following code
xlworkBook = xlApp.Workbooks.Open(ExcelFile_Path)
I feel like that its not possible to open a workbook which has a corrupted
sheetname.
How do microsoft open such file and ask for renaming it,and rename it?