; ; ------------------------------------------------------------ ; ; PureBasic - File example file ; ; (c) Fantaisie Software ; ; ------------------------------------------------------------ ; XIncludeFile "libxl.pb" book = xlCreateXMLBook() sheet = xlBookAddSheet(book, "my") xlSheetWriteStr(sheet, 3, 1, "USA") xlSheetWriteStr(sheet, 4, 1, "UK") xlSheetWriteStr(sheet, 5, 1, "Germany") xlSheetWriteStr(sheet, 6, 1, "Switzerland") xlSheetWriteStr(sheet, 7, 1, "Spain") xlSheetWriteStr(sheet, 8, 1, "Italy") xlSheetWriteStr(sheet, 9, 1, "Greece") xlSheetWriteStr(sheet, 10, 1, "Japan") xlSheetWriteStr(sheet, 11, 1, "Spain") xlSheetWriteStr(sheet, 12, 1, "France") cFormat = xlBookAddConditionalFormat(book) xlConditionalFormatSetFillPattern(cFormat, #FILLPATTERN_SOLID) xlConditionalFormatSetPatternBackgroundColor(cFormat, #COLOR_YELLOW) conditionalFormatting = xlSheetAddConditionalFormatting(sheet, 3, 12, 1, 1) xlConditionalFormattingAddRule(conditionalFormatting, #CFORMAT_DUPLICATEVALUES, cFormat, "", 0) xlBookSave(book, "out.xlsx") xlBookRelease(book) End ; IDE Options = PureBasic 6.30 (Windows - x64) ; CursorPosition = 33 ; EnableXP ; DPIAware