Hi there
I am trying to open an existing spreadsheet from VB.net 2005.
I used the code as given else where on your site:
Dim xlsApp As Excel.Application
Dim xlsWB As Excel.Workbook
Dim xlsSheet As Excel.Worksheet
Dim xlsCell As Excel.Range
Dim xlsDatei As String
xlsApp = New Excel.Application
xlsApp.Visible = True
xlsWB = xlsApp.Workbooks.Open("c:\123.xls") *** my problem ***
xlsSheet = xlsWB.Worksheets(1)
xlsCell = xlsSheet.Range("A1")
but I get an error as follows when it comes to opening the file (when making xlsApp visible excel itself does open, just not the file..):
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147417851
Message="The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))"
Source="Interop.Excel"
StackTrace:
at Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad)
So far I have wasted an afternoon trying to do this basic thing and I would be wrapped if someone could give me a little shove in the back :-)
Thanks very much!
Rino
PS Sorry, not too sure on how to do this code wrapping..
R