On 05/02/2007, at 4:32 AM, Bart Aimar wrote:

Hi,

inserting rows with insert metod seems having ungrateful effects on formula positioned in under part cells.

A simple example...

in calc table write:

at cell B11: 1
at cell B12: 2
at cell B13: 3
and in cell B10: =SUM(B11:B13)

and execute this code:

Sub Main
osheet=ThisComponent.sheets.getByName(_
ThisComponent.currentController.activesheet.name)
oSheet.Rows.InsertByIndex(8.3)
end sub

Changing the values of "position row" and "inserting rows nunber" return unexpected result in B10 formula... (you can easily to try...)

Is it normal?


Bart,

It appears this is "normal".

Please look at menu Tools - Options - OpenOffice.org Calc - General
Look at checkbox in Input Settings - "Expand references when new column/rows are inserted"

I was able to reproduce the error you described, only if this box is checked. In that case the first cell address in the SUM range is not changed, so that sometimes the sum formula cell will end up inside the formula range, which is an error. There is more discussion about this in the Help.

Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to