Trying to write information in Excel worksheet But have some strange problems ;) i looked info on Google but no result.. So plz help )
I Add reference Microsoft.exce
That's because .Cells() returns an object.
.Cells()
You can try converting it to a Excel Cell object in another step, or you can try this (for example):
Cell
shXL.Range("A2").Value
With conversion will be:
Dim xRng As Excel.Range = CType(shXL.Cells(3,3), Excel.Range) Dim val As Object = xRng.Value()