Skip to content

Instantly share code, notes, and snippets.

View ceruleancerise's full-sized avatar
🐘

James ceruleancerise

🐘
View GitHub Profile
@ceruleancerise
ceruleancerise / SetValueAsBackgroundColor.bas
Last active December 7, 2023 07:46
OpenOffice / LibreOffice: Set Selections' Values As Background Color To JSON (BASIC Macro)
REM ***** BASIC *****
'Sets the value of selected cells as the hex code for the background color.'
'(More useful if you set this macro as a toolbar button.)'
SUB SetValueAsBackgroundColor
SET selectionRange = ThisComponent.CurrentSelection
FOR j = 0 TO selectionRange.Columns.getCount() - 1
FOR i = 0 TO selectionRange.Rows.getCount() - 1
@ceruleancerise
ceruleancerise / ExportToJSON.bas
Last active July 27, 2024 22:42
OpenOffice / LibreOffice: .ods Export To JSON (BASIC Macro)
REM ***** BASIC *****
'Exports sheet(s) to JSON in this file's directory under their sheet name.'
'Booleans are exported as int (1 = true, 0 = false).'
SUB JSONExportAll
sheets = ThisComponent.Sheets
numSheets = sheets.Count