Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/XL/Generate
Function:
Required plugins for this example: MBS XL Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /XL/Generate
This example is the version from Sun, 20th Jan 2018.
Project "Generate.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
EventHandler Sub Open() RegisterLibXL // create new xls file dim book as new XLBookMBS(false) // create sheet dim sheet as XLSheetMBS = book.AddSheet("Sheet1") // write some values call sheet.WriteString 2, 1, "Hello World" call sheet.WriteNumber 3, 1, 1000.0 // write date dim dateFormat as XLFormatMBS = book.AddFormat dateFormat.NumFormat = dateFormat.NumformatDate call sheet.WriteNumber 4, 1, book.PackDate(2008, 4, 29), dateFormat // set column 1 to width 12 call sheet.SetCol 1, 1, 12 // write file dim file as FolderItem = SpecialFolder.Desktop.Child("Generate.xls") if book.Save(file) then file.Launch else MsgBox "Failed to create file."+EndOfLine+EndOfLine+book.ErrorMessage end if quit End EventHandler
Sub RegisterLibXL() // once you bought a LibXL license, you can put your license key here // see order links on our website // http://www.monkeybreadsoftware.de/xojo/plugin-xls.shtml #if TargetMacOS then XLBookMBS.SetKeyGlobal "your name", "your Mac LibXL license key" #elseif TargetWin32 then XLBookMBS.SetKeyGlobal "your name", "your Windows LibXL license key" #elseif TargetLinux then XLBookMBS.SetKeyGlobal "your name", "your Linux LibXL license key" #endif End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS XL Plugin.





Links
MBS FileMaker blog