Seite 2 von 4

Verfasst: 07.04.2006 17:37
von ABBKlaus
Hi,

:? also Ich kann nicht ganz nachvollziehen.
In der Hilfe steht doch row / col von 0-65535.
Dachte mir schon, daß diese Anpassung Probleme bereitet :o
Und das mit der F64 lib ist auch in der Hilfe erwähnt :twisted:
(und der Download link ist auch drinnen)

Sorry das mit PB4 aber für ne beta kann ich nix :oops:

MfG Klaus

Verfasst: 07.04.2006 18:00
von ts-soft
Wenns soweit ist, wäre eine PB4 kompatible Lib natürlich schön :wink:
Vielleicht kannste ja so lange eine Include für PB4 erstellen?

Verfasst: 07.04.2006 18:15
von ABBKlaus
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

Verfasst: 07.04.2006 20:00
von ABBKlaus
so neue Version ist online :allright:

Bitte testen /:->

@TS-Soft ich bin mir nicht ganz sicher ob du das mit dem Includefile so gemeint hast :oops:

http://www.purebasicpower.de/?download= ... ter101.zip

http://www.purebasicpower.de/?download= ... er_PB4.zip

MfG Klaus

Verfasst: 07.04.2006 20:20
von ts-soft
ABBKlaus hat geschrieben: @TS-Soft ich bin mir nicht ganz sicher ob du das mit dem Includefile so gemeint hast :oops:
Danke, genau so!

Verfasst: 08.04.2006 03:12
von Falko
Man bin ich froh, das ich Excel 2003 hab. Läuft soweit prima.
Danke :allright:

Verfasst: 10.04.2006 13:28
von Karl
CSV-Konvertierung geht problemlos.

Die Formatierung

Code: Alles auswählen

XLS_WriteText(text.s, r.l, c.l, #XLS_Font0, #XLS_RightAlign, #XLS_CellNormal, #XLS_Bold)
bewirkt nix. Der Text wird nicht fett angezeigt. Der Font0 ist #XLS_NoFormat.

Was noch die Krönung wäre:

XLS_WriteFormula :wink:

falls das geht.

Ansonsten :allright:

Gruß Karl

Verfasst: 10.04.2006 17:49
von ABBKlaus
ja Karl du hast recht, die Anleitung ist falsch. :oops:
Habs in der Hilfedatei korrigiert, ihr müsst nur nochmal die V1.01 runterladen.

XLS_WriteDate() fixed
XLS_WriteInteger() fixed
XLS_WriteNumber() fixed
XLS_WriteText() fixed

Code: Alles auswählen

Cellformat ist eine vordefinierte Konstante :
  0 = "Gerneral"
  1 = 0
  2 = 0.00
  3 = #,##0
  4 = #,##0.00
  5 = #,##0\ "$";\-#,##0\ "$
  6 = #,##0\ "$";[Red]\-#,##0\ "$"
  7 = #,##0.00\ "$";\-#,##0.00\ "$"
  8 = #,##0.00\ "$";[Red]\-#,##0.00\ "$"
  9 = 0%
  10 = 0.00%
  11 = 0.00E+00
  12 = yyyy-mm-dd
  13 = dd/\ mmm\ yy
  14 = dd/\ mmm
  15 = mmm\ yy
  16 = h:mm\ AM/PM
  17 = h:mm:ss\ AM/PM
  18 = hh:mm
  19 = hh:mm:ss
  20 = dd/mm/yy\ hh:mm
  21 = ##0.0E+0
  22 = mm:ss
  23 = @
MfG Klaus

Verfasst: 22.06.2006 10:17
von Ghosty
Bin beim stöbern auf das Thema gestoßen...

Gibts da jetzt eine entsprechende "ExcelReader" lib oder etwas ähnlich einfach zu verwendendes...

Greetz... Ghosty ;)

Verfasst: 22.06.2006 11:36
von ABBKlaus
Ist leider nicht geplant, weil das ganze sehr komplex ist.
Kannst dich ja mal einlesen ins Excel File Format :twisted:
http://sc.openoffice.org/excelfileformat.pdf