Function
ReadData()
Dim
i%, rsdata$, ID$, ARBPL$, Bereich$, X_Koordinate$, Y_Koordinate$, Ebene$
Dim
rs
As
Recordset
rsdata =
"([ID],[ARBPL],[Bereich],[X_Koordinate],[Y_Koordinate],[Ebene])"
& vbNewLine
With
shtKoordination
For
i = 2
To
.Cells(Rows.count, 1).
End
(xlUp).Row
Step
1
ID = .Cells(i, 1).Value
ARBPL = .Cells(i, 2).Value
Bereich = .Cells(i, 3).Value
X_Koordinate = .Cells(i, 4).Value
Y_Koordinate = .Cells(i, 5).Value
Ebene = .Cells(i, 6).Value
If
(i = 2)
Then
rsdata = rsdata &
"("
Else
rsdata = rsdata &
","
& vbNewLine &
"("
End
If
rsdata = rsdata &
"'"
& ID &
"'"
&
","
&
"'"
& ARBPL &
"'"
&
","
&
"'"
& Bereich &
"'"
_
&
","
&
"'"
& X_Koordinate &
"'"
&
","
&
"'"
& Y_Koordinate &
"'"
&
","
&
"'"
_
& Ebene &
"'"
&
")"
Next
rsdata = rsdata &
";"
End
With
End
Function