Excel-Datei mit spezieller Endung speichern
18.12.2003 11:06:33
Christoph Gaupp
habe immer noch das problem das ich es nicht hinbekomme, das excel die dateien in dem format, wie ich es unbedingt benötige, abspeichert.
ich brauche als endung .ida0001 mit fotlaufender nummer (ida0002,ida0003 usw)
die datei soll als unformatierter text ausgegeben werden.
er hängt mir immer .prn dahinter, wie bekomm ich das weg
danke im voraus
christoph
mein speicherbefehl ist momentan:
ActiveWorkbook.SaveAs Filename:=pfaedle & ordner & "\" & "Druckverlauf_Zylinder" & z & "_n" & drehzahl & ".ida" & Format(((l - 2) * c) + z, "0000"), FileFormat:=xlTextPrinter
also vereinfacht:
ActiveWorkbook.SaveAs Filename:="blablabla" ".ida" & Format(counter, "0000"), FileFormat:=xlTextPrinter
mein gesamter speicherbefehl ist wie folgt:
Windows(fenster).Activate
pfaedle = ThisWorkbook.Path
ordner = "\" & "Druckverläufe_" & Cells(1, 1) & "_" & Cells(1, 11)
sdirectory = Dir(pfaedle & ordner & "\*.*")
If (sdirectory <> "") Then
Else
MkDir pfaedle & ordner
End If
Windows(neu).Activate
zahler = 1
10 zahler = zahler + 1
sfile = Dir(pfaedle & ordner & "\" & "Druckverlauf_Zylinder" & z & "_n" & drehzahl & ".ida" & Format(((l - 2) * c) + z, "0000") & ".prn")
sfile2 = Dir(pfaedle & ordner & "\" & "Druckverlauf_Zylinder" & z & "_n" & drehzahl & "_Version" & zahler & ".ida" & Format(((l - 2) * c) + z, "0000") & ".prn")
If (sfile <> "") Then
If (sfile2 <> "") Then GoTo 10
ActiveWorkbook.SaveAs Filename:=pfaedle & ordner & "\" & "Druckverlauf_Zylinder" & z & "_n" & drehzahl & "_Version" & zahler & ".ida" & Format(((l - 2) * c) + z, "0000"), FileFormat:=xlTextPrinter
Else
ActiveWorkbook.SaveAs Filename:=pfaedle & ordner & "\" & "Druckverlauf_Zylinder" & z & "_n" & drehzahl & ".ida" & Format(((l - 2) * c) + z, "0000"), FileFormat:=xlTextPrinter
End If
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True