gerdb.blogg.se

Libreoffice calc excel
Libreoffice calc excel












I don't feel like figuring out what this does Selection.SpecialCells(xlBlanks).If you had installed LibreOffice look for cli_basetypes.dll, cli_cppuhelper.dll, cli_oootypes.dll, cli_uno.dll, cli_ure.dll, cli_uretypes.dll then add references to your project, it must work for you, i also installed "Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats" and "Microsoft Access Database Engine 2010 Redistributable" (to get ACE.OLEDB.12.O connection without complete Office installation). 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.

libreoffice calc excel

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.

libreoffice calc excel

If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "q" Then

libreoffice calc excel

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.














Libreoffice calc excel