Example: /XL/Format

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/XL/Format


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/Format

This example is the version from Sun, 20th Jan 2018.

Project "Format.xojo_binary_project"
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) dim font as XLFontMBS = book.AddFont font.name = "Impact" font.size = 36 dim format as XLFormatMBS = book.AddFormat format.AlignH = format.AlignHCenter format.setborder format.BorderStyleMediumdashdot format.setBorderColor font.ColorRed // format.ColorRed format.font = font // create sheet dim sheet as XLSheetMBS = book.AddSheet("Custom") // write some values call sheet.WriteString 2, 1, "Hello World", format // set column 1 to width 12 call sheet.SetCol 1, 1, 25 call sheet.WriteNumber 5,5,11, nil // write file dim file as FolderItem = SpecialFolder.Desktop.Child("Format.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

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


💬 Ask a question or report a problem