GoExcel.Open(Link, "Tabelle1")
Planexo = GoExcel.CellValue("F3")
Planex1 = GoExcel.CellValue("F4")
Planex2 = GoExcel.CellValue("F5")
Planex3= GoExcel.CellValue("F6")
Planex4= GoExcel.CellValue("F7")
Planex5= GoExcel.CellValue("F8")
Planex6= GoExcel.CellValue("F9")
Planey0= GoExcel.CellValue("H3")
Planey1 = GoExcel.CellValue("H4")
Planey2 = GoExcel.CellValue("H5")
Planey3 = GoExcel.CellValue("H6")
Planey4 = GoExcel.CellValue("H7")
Planey5 = GoExcel.CellValue("H8")
Planey6 = GoExcel.CellValue("H9")
'[length of arrays
For Each xVar In PlaneX
lenX = lenX + 1
Next
For Each yVar In PlaneY
lenY = lenY + 1
Next
']
'[sorting the array with distance
For j = 0 To lenX - 2
For h = 0 To lenX - 2
If PlaneX(h)>PlaneX(h+1)
temp = PlaneX(h)>PlaneX(h+1)
PlaneX(h + 1) = PlaneX(h)
PlaneX(h) = temp
End If
Next
Next
For j = 0 To lenY - 2
For h = 0 To lenY - 2
If PlaneY(h) >PlaneY(h + 1)
temp = PlaneY(h) >PlaneY(h + 1)
PlaneX(h + 1) = PlaneY(h)
PlaneY(h) = temp
End If
Next
Next
']
While Bool
A = GoExcel.CellValue("A" & i)
If String.Compare(Left(A, 2), "No") = 0
If String.Compare(Left(Right(A, 2), 1), "x") = 0
Plane.Add(i)
PlaneName.Add("Ebene" & Right(A, 2))
NumberOfPlane.Add(GoExcel.CellValue("B" & i))
xy.Add("x")
Else If String.Compare(Left(Right(A, 3), 1), "x") = 0
Plane.Add(i)
PlaneName.Add("Ebene" & Right(A, 2))
NumberOfPlane.Add(GoExcel.CellValue("B" & i))
xy.Add("x")
Else If String.Compare(Left(Right(A, 2), 1), "y") = 0
Plane.Add(i)
PlaneName.Add("Ebene" & Right(A, 2))
NumberOfPlane.Add(GoExcel.CellValue("B" & i))
xy.Add("y")
Else If String.Compare(Left(Right(A, 3), 1), "y") = 0
Plane.Add(i)
PlaneName.Add("Ebene" & Right(A, 2))
NumberOfPlane.Add(GoExcel.CellValue("B" & i))
xy.Add("y")
Else If String.Compare(Right(A, 8), "Förderer") = 0
Bool = False
End If
End If
If i = 1000
Bool = False
End If
i=i+1
End While
this is the code that i wrote. the excel table is defined in parameters a text file under the name "Link".
the program opens the data, but it can't read the columm A for some reason.
This is the first time that this happens to me.