Hi all,
I would like to open the excel file after create the excel file. The creating file function is done, but the system unable to open the excel file. My coding as below:
----------------------------------------------------------
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim misValue As Object = System.Reflection.Missing.Value
xlApp = New Excel.ApplicationClass
xlWorkBook = xlApp.Workbooks.Add(misValue)
......
xlWorkBook.SaveAs("C:\testing.xls")
Try
xlWorkBook = xlApp.Workbooks.Open(("C:\testing.xls")
Catch EX As Exception
MsgBox("Open Excel File Error" & EX.Message)
End Try
xlWorkBook.Close()
xlApp.Quit()
releaseObject(xlApp)
releaseObject(xlWorkBook)
--------------------------------------------------------------------
The file can be saved but can't be opened.. any expert know the solution? Thanks!
I would like to open the excel file after create the excel file. The creating file function is done, but the system unable to open the excel file. My coding as below:
----------------------------------------------------------
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim misValue As Object = System.Reflection.Missing.Value
xlApp = New Excel.ApplicationClass
xlWorkBook = xlApp.Workbooks.Add(misValue)
......
xlWorkBook.SaveAs("C:\testing.xls")
Try
xlWorkBook = xlApp.Workbooks.Open(("C:\testing.xls")
Catch EX As Exception
MsgBox("Open Excel File Error" & EX.Message)
End Try
xlWorkBook.Close()
xlApp.Quit()
releaseObject(xlApp)
releaseObject(xlWorkBook)
--------------------------------------------------------------------
The file can be saved but can't be opened.. any expert know the solution? Thanks!