werd Ich machen TS-Soft,
@Karl, du hast recht

im Moment ist es nicht möglich mit Openfile und meiner Lib zu arbeiten, da Ich die PB Befehle auch benutze.
Muss also zwischengespeichert werden dann sollte alles klappen.
MfG Klaus
Code: Alles auswählen
;Eine CSV-Datei ins Excelformat konvertieren
NewList test.s()
If ReadFile(0, "c:\data\op-montage\SQL\OPTabelle.txt")
While Eof(file)=0
AddElement(test())
test()=ReadString()
Wend
CloseFile(file)
XLS_CreateFile("c:\pbTest.xls")
XLS_PrintGridLines(#False)
XLS_SetMargin(#XLS_TopMargin, "1.5") ; set to 1.5 inches
XLS_SetMargin(#XLS_LeftMargin, "1.5")
XLS_SetMargin(#XLS_RightMargin, "1.5")
XLS_SetMargin(#XLS_BottomMargin, "1.5")
XLS_SetFont("Arial",10,#XLS_NoFormat)
XLS_SetFont("Arial",10,#XLS_Bold)
XLS_SetFont("Arial",10,#XLS_Bold|#XLS_Underline)
XLS_SetFont("Arial",18,#XLS_Italic)
XLS_SetColumnWidth(0,0,50)
XLS_SetDefaultRowHeight(16)
;XLS_SetRowHeight(0,24)
;XLS_SetRowHeight(1,24)
XLS_SetHeader("This is the header")
XLS_SetFooter("This is the footer")
ForEach test()
XLS_WriteText(test(),ListIndex(test()), 0, #XLS_Font0, #XLS_RightAlign, #XLS_CellNormal, #XLS_Bold)
Next
XLS_CloseFile()
Else
Debug "File not found"
EndIf