NE
NE
ich hab ein txt-File das schaut etwa ab Zeile 1 so aus:
AcDbPolyline: 0
42,6016337897688;0
0;47,5005143514831
-16,2585945120821;0
0;-10,7682271058531
-16,9264543215169;-6,06026602840103
-25,0437581194576;0
15,6271731632879;-30,6720212172289
AcDbPolyline: 1
42,6016337897688;0
15,083133657257;21,8987200871411
-31,341728169339;25,601794264342
0;-20,3573632760519
-14,4413926826466;-3,68049126415613
-11,9016465950402;-8,4516748457959
0;-15,0109849654792
AcDbPolyline: 2
60,8986583075515;8,94034732949965
-18,2970245177827;38,5601670219834
-16,2585945120821;0
0;-20,3573632760519
-10,2902497212156;-12,132166109952
-16,0527895564711;0
0;-15,0109849654792
Nun wollte ich das Teil in xl einlesen, jedoch
ergibt das recht komische Werte von wegen 426016337897688 bzw. 4,2602E+14
Was mach ich denn da falsch?
lg Nancy
--
Sub einlesen()
Dim ff As Integer
Dim zeile As String
Dim b As Long
Dim arrZeile As Variant
ff = FreeFile
Open "c:\dummy\block\dimension.txt" For Input As #ff
b = 1
While Not EOF(ff)
Line Input #ff, zeile
If InStr(1, zeile, "AcDb") Then
Sheets(1).Cells(b, 1) = zeile
b = b + 1
Else
arrZeile = Split(zeile, ";")
With Sheets(1)
.Cells(b, 2) = arrZeile(0)
.Cells(b, 3) = arrZeile(1)
.Cells(b, 5) = Cells(b, 2) + Cells(b - 1, 5)
.Cells(b, 6) = Cells(b, 3) + Cells(b - 1, 6)
End With
End If
b = b + 1
'************ erstmal außen vor, obwohl schön wär's ;-) **********
' Charts.Add
' ActiveChart.ChartType = xlXYScatterLines
' ActiveChart.SetSourceData Source:=Sheets(1).Range("E" & ? &":F" & ? & "), PlotBy _
' :=xlColumns
' ActiveChart.Location Where:=xlLocationAsObject, Name:="Tabelle1"
Wend
Close #ff
End Sub