Jump to content
Xtreme .Net Talk

mhpo

Members
  • Posts

    8
  • Joined

  • Last visited

Personal Information

  • .NET Preferred Language
    VB.NET

mhpo's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. VolteFace Oh yes - that's it! Thank you. :)
  2. Hi, I'm wondering, when I want to write and read a view times with / to console if there is not a possibility to shortening my VB code like this: with system.console .writeline("...") myVar = .readline() .writeline(...) myVar2 = .readline() end with That doesn't function. What functions is to seperate the blocks for read and write: With System.Console.In myVar = .ReadLine() End With With System.Console.Out .WriteLine("...") End With But that's not what makes my code effective. Is there another way to do it more elegant :confused:??? Thank you for all answers.
  3. ooohhh yes - at long last I have the solution : So please read the article in the MSDN: http://support.microsoft.com/default.aspx?scid=kb;en-us;320369 Greetings mhpo ;)
  4. I want to access Excel-Cells from a Windows-Form. Can I use a reference to a Excel 97-Workbook (COM-reference) in VB.NET (Visual Studio .NET)? I only get a error-message by doing this. If 've sighted a lot of articles that describe the general access to Excel-Cells. And so I did it - but always failed. Can VB.NET not reference to this old excel-version ? Thank you for all hints.
  5. Hi, if you want to access the cells correctly, follow the Excel object-hierarchy. This example shows you the access to a single cell: Dim oXLApp As Excel.Application Dim oXLWs As Excel.Worksheet dim strCell as String oXLApp = New Excel.Application() oXLApp.Workbooks.Open("FileName") oXLWs = oXLApp.ActiveWorkbook.Sheets(1) strCell = oXLWs.Range("A1").Value or strCell = oXLWs.Range("Name_of_the_cell").Value To access more than one cell, take a for-next-statement etc. combined with the cells-object.
  6. Hi, I'm trying to access Excel-cells. Therefor I added a reference to the installed Excel 8.0 Object Library. Here is my .NET-code: Dim xlApp As Excel.Application Dim xlMappe As Excel.Workbook Dim xlZelle As Excel.Range xlApp = New Excel.Application() xlMappe = xlApp.Workbooks.Open("C:\Kk.xls") xlZelle = xlMappe.Worksheets(1).Range("A1") xlZelle.Value = "content" ... When it runs, the following error-message occurs: 'Old format or invalid type library' Does someone know, what's going wrong ??
  7. Hi, I'm trying to access MS Excel-cells with VB .NET. Therefor i implemented a reference to the installed Excel 8.0 Object Library. So far the Excel-Objects can be referenced. The following code attempts to write data to the cells: Dim xlApp As Excel.Application Dim xlMappe As Excel.Workbook Dim xlZelle As Excel.Range xlApp = New Excel.Application() xlMappe = xlApp.Workbooks.Open("C:\KK.xls") xlZelle = xlMappe.Worksheets(1).Range("A1") xlZelle.Value = "content" When it runs, this error-message occurs: 'Old format or invalid type library' What's going wrong ??
×
×
  • Create New...