JorisB
Legacy Member
weet er iemand hoe offset in vb.net werkt want ik zou dit nodig hebben om door een excelbestand te kunnen lopen en hier data uit te kunnen halen of weet er iemand een andere manier hiervoor.
Ik heb nu momenteel deze code maar die blijkt niet te werken:
thx Joris
Ik heb nu momenteel deze code maar die blijkt niet te werken:
Code:
Dim nieuweklas As String = xlWorkSheet.Application.ActiveCell.Text
Dim titularis As String
Dim oudeklas As String = nieuweklas
Dim achternaamleerling As String
Dim voornaamLeerling As String
If nieuweklas = oudeklas Then
xlWorkSheet.Application.ActiveCell.Offset(0, -3)
voornaamLeerling = xlWorkSheet.Application.ActiveCell.Text
xlWorkSheet.Application.ActiveCell.Offset(0, -1)
achternaamleerling = xlWorkSheet.Application.ActiveCell.Text
Else
xlWorkSheet.Application.ActiveCell.Offset(0, -1)
titularis = xlWorkSheet.Application.ActiveCell.Text
xlWorkSheet.Application.ActiveCell.Offset(0, -1)
VoornaamLeerling = xlWorkSheet.Application.ActiveCell.Text
xlWorkSheet.Application.ActiveCell.Offset(0, -1)
achternaamleerling = xlWorkSheet.Application.ActiveCell.Text
End If