RinoStoof 0 Newbie Poster

Hi WHUBS

I have been having a few problems with the above project..

I'm importing info for tires from the attached spreadsheet (no idea why it is so large sorry).

To get the categories (passenger, truck tc.) I have to add in a formula to make it a row in the dataset. for obvious reasons the dataset ignores the large headers. Unfortunately I need them.
The same with the rim diameter.

For some reason the 'tread' column just doesn't show so I have to copy that into another column which it then does pick up ??

I can't really expect our customers to do this manually before importing.

In VB6 I used to just go into the sheet and do whatever I wanted. Not as elegant as your method but at least I could make it do what I wanted.

So all in all I would really like to be able to open and manually manipulate the sheet.
As described above I didn't have much luck with that..

Can you, or anyone else, help please?

Thanks very much in advance!

RinoStoof 0 Newbie Poster

Hi WHUBS

Hey that works an absolute treat! Thank you very much for your help! You've saved my head as well as the wall :-)

Kind regards
Rino

RinoStoof 0 Newbie Poster

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

RinoStoof 0 Newbie Poster

Hi there

I used the code as given but I get an error as follows:

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