Guten Morgen zusammen,
ich habe diese "Excel" DLL die ich gerne einbinden würde.
Das Beispiel für PowerBasic habe ich erst mal minimal portiert...
XPROFAN:
Code
'LIBXL test
Declare LibXLDll&
LibXLDll& = ImportDll("LibXl.dll","")
Declare int Book
Declare int Sheethandle
Declare string Name
Name = "Hallo Welt"
Window 800,600
Book = xlCreateBookCW()
If Book
Sheethandle = xlBookAddSheetW(Book,Name,0)
'Hier bekomme ich schon einen Absturz
EndIf
WaitInput
FreeDll LibXLDll&
Alles anzeigen
PowerBasic: (Wobei ich die Funktionen in XProfan direkt angesprochen habe erst mal ohne include)
Code
FUNCTION PBMAIN () AS LONG
DIM book AS BookHandle
book = xlCreateBook()
IF(book) THEN
DIM sheet AS SheetHandle
sheet = xlBookAddSheet(book, UCODE$("sheet1") , 0)
END IF
'if(sheet)
'{
xlSheetWriteStr(sheet, 2, 2, UCODE$("AEHello, World !"), 0)
xlSheetWriteNum(sheet, 3, 1, 1000, 0)
'}
xlBookSave(book, UCODE$("example.xls"))
MSGBOX("File Written")
xlBookRelease(book)
END FUNCTION
Alles anzeigen
Ich verstehe nicht warum das nicht funktionieren soll ![]()
![]()