
: Effort Estimation Using Learning Curves.: Output from deviceQuery for NVidia GTX 560.: Good, Fast, Cheap: You Can Only Pick Two!.: What Makes a Good Programming Environment?.: JavaScript grid editor: I want to be Excel.GCC for the OpenMP vector triad: Barrier shootout! : Dramatic Faster Sorting in Linux Using Nsort.: HipHop Virtual Machine can run WordPress.: Very simple SHA1 test program written in C.: Hash functions: An empirical comparison - article by Peter Kankowski.: GNU C: Extensions to the C Language Family.: OpenGL Program: Earth with Moon Rotating around Sun.: Number of Combinations for German Tax Id.Tags: Calc, storeAsUrl, UCase, VBA, getByIndex, getCellByPosition, Microsoft, OpenOffice, VisualBASIC, Excel, getSheets, LibreOffice, ClearComments, IsEmpty, xlDialogSaveAs setString( UCase(.getString())) to uppercase a cell Somehow the lines with ThisComponent.storeAsUrl("file://tmp/Test.csv", args2() ), but didn't dwell into that any further.( ThisComponent.getSheets().getByIndex(2) ) to activate sheet #3.ThisComponent.getSheets().getByIndex(1).ClearContents( 1023 ) to delete everything in that sheet.ThisComponent.getSheets().getByIndex(0).getCellByPosition(0,0).Type = 2 to check if cell is empty.ThisComponent.getSheets().getByIndex(0).getCellByPosition(0,0).CellBackcolor = 48000 sets the background color.ThisComponent.getSheets().getByIndex(0).Annotations.insertNew( ThisComponent.getSheets().getByIndex(0).getCellByPosition(0,0).getCellAddress, "New comment" ) for adding a comment.ThisComponent.getSheets().getByIndex(0).getCellByPosition(i,j).getString() fetching character string from cell at row (i+1), and column (j+1).ThisComponent.getSheets().getByIndex(0) references the first sheet, usually called Sheet1.Now the above Excel functionality in LibreOffice. In case one wants a push-button in the spreadsheet: The connection between clicking on a push button and its association with a subroutine is not by naming convention but rather by explicit association with Events. Information on various BASIC functionality seems to be spread across various internet forums. That's basically all it needs to program in Excel VBA.ĭoing the same in LibreOffice (OpenOffice) is somewhat similar but usually much more arcane and more dogmatic.

The usual BASIC-style statements are used, e.g.,

Worksheets(i).Activate makes i-th worksheet active (bring to foreground).Worksheets(i).Cells.Clear to wipe out all content in a worksheet.Worksheets(i).Cells.ClearComments to clear all comments in all cells in a worksheet.Worksheets(i).=xlNone to clear background color in all cells in a worksheet.IsEmpty(cell) checks whether cell is empty.MsgBox(string) for displaying a short text in a message box.Cells(i,j).Interior.Color sets the background color of the cell.

