Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenFri, 25 Oct 2019 09:12:27 +0200BASIC|Calc: How delete empty cells in all range in one passhttps://ask.libreoffice.org/en/question/214451/basiccalc-how-delete-empty-cells-in-all-range-in-one-pass/ Hi
The next problem is how to quick delete all empty cells in a range.
I wrote the code that delete empty cell in a 3 dimension array:
for x=0 to max_col
for y=0 to max_row
if cell="" then
Doc.Sheets(1).removeRange(CellRangeAddress,com.sun.star.sheet.CellDeleteMode.LEFT)
end if
next y
next x
This is simple example not the whole code but its work.
The problem is that its work weary slow
Is there any other solution to delete empty cells in whole range in one pass?
chris1701Fri, 25 Oct 2019 09:12:27 +0200https://ask.libreoffice.org/en/question/214451/Format Range to Number and 2 decimal placeshttps://ask.libreoffice.org/en/question/139748/format-range-to-number-and-2-decimal-places/I can define my Range in column D with:
myRange = mySheet.GetCellRangeByPosition(3,1,3,1040)
How do I format it in Basic ?
I'm new at using LO Basic, where can I find an object model, methods and properties reference ?digifossMon, 04 Dec 2017 00:47:43 +0100https://ask.libreoffice.org/en/question/139748/Calc - selecting a named range and copying it in the clipboardhttps://ask.libreoffice.org/en/question/30758/calc-selecting-a-named-range-and-copying-it-in-the-clipboard/I searched an entire day and could not find any answer. This relates to calc automation / basic.
Let's say I have a named range called "Details" in a given sheet of a calc document. I want the range to be selected and then copied to the windows clipboard for manual pasting in a non libreoffice application. Can anyone help me ? Thanks in advance.
Would it be possible to copy the named range to the windows clipboard without selecting the range ?
Would it be possible to do this without viewing the calc document (i.e. hidden) ?LucWed, 05 Mar 2014 22:53:36 +0100https://ask.libreoffice.org/en/question/30758/Calc - Basic script for Saving a named-range to csvhttps://ask.libreoffice.org/en/question/16760/calc-basic-script-for-saving-a-named-range-to-csv/Within Calc, what is the Basic script to save a named-range within a spreadsheet to a csv file ?
e.g. named range within the Calc spreadsheet contains a table of numbers, just want to save this range to a csv-file.
Many thanks in advance!rgpkMon, 29 Apr 2013 03:24:35 +0200https://ask.libreoffice.org/en/question/16760/count cells in a range in macrohttps://ask.libreoffice.org/en/question/4942/count-cells-in-a-range-in-macro/
I have a cellrange and I'm trying to get the number of cells populated in that range.
oCellRange = rr_sheet.getCellRangeByName("a63:b68")
I tried count=oCellRange.computeFunction(com.sun.star.sheet.GeneralFunction.COUNT), but that gives the total number of rows in the range, I just want the ones that have data.
I tried the above call with COUNTA, but that complained and said it was not found. I could write a little function that loops through the DataArray, but I was trying to avoid that.ptn4eglFri, 17 Aug 2012 02:58:03 +0200https://ask.libreoffice.org/en/question/4942/