

But if you take the time to understand what these functions are doing you can often use them in other ways.Īs we pointed out, all functions in Calc take arguments and in this case as you might expect the arguments would have to do with interest rates, principle amounts, time periods, and payment amounts. The thing you need to bear in mind about these is that they are all oriented to doing financial analysis on investments. So it should not come as great surprise that there are many great financial functions in Calc. And the reason for that was that you could do sophisticated financial analysis with spreadsheets. I don't feel like figuring out what this does Selection.SpecialCells(xlBlanks).As we discussed back when we first looked at spreadsheets, they were the killer app that lead to wide-spread adoption of PCs in companies. ThisComponent.getCurrentController().getActiveSheet().getCellByPosition(nCol, nRow).getString() = "a"


You do not need to use the range at all, since you only care about a single cell, so, you get the active sheet and then get a particular cell from the sheet. When you have the active cell, you get the cell address, and from that, you have the row. REM Restore the old selection, but lose the previously active cell OConv.Address = oActiveCell.getCellAddress OConv = oDoc.createInstance(".CellAddressConversion") ORanges = oDoc.createInstance(".SheetCellRanges") REM This leaves ONLY the active cell selected. REM Create an empty SheetCellRanges service and then select it. Here is some craziness to get the active cell: Sub RetrieveTheActiveCell()ĭim oOldSelection 'The original selection of cell rangesĭim oRanges 'A blank range created by the documentĭim oConv 'The cell address conversion service The Cells command returns a specific cell based on a row and column. Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "a" Sadly, this can be tricky depending on what your macro does. You must translate the portions that manipulate the document to use the UNO API. I just want to add that the function SinceLastWash gives the correct value in some cells where I use it and in others gives an error, #NAME? Is there a way to convert this code to make it compatible with libreoffice or do I have to learn an altogether new language like python? Learning python would not be a problem but is not a solution to my problem as I have many work related files in excel which have a lot of vba code and it is not possible for me to use open office/libreoffice at work. If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "q" Then If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "a" Then Selection.SpecialCells(xlBlanks).Delete shift:=xlToLeft Below is the vba code I have: Option VBASupport The only problem I am facing is that libreoffice, the default spreadsheet package is not compatible with excel macros. I have recently migrated to pclinuxos from windows and seem to like it.
