

- #Openoffice calculate field grow shrink zip
- #Openoffice calculate field grow shrink free
- #Openoffice calculate field grow shrink windows
Just append the two symbols to your global list g_exportedScripts.Ĭlick any cell within your list (or directly below) where you want to insert a new row and hit Ctrl+Ins (if that is the shortcut you assigned to "InsertListRows"). You may copy "insertListRows" and "removeListRows" into your own Python modules. Python macros require this type of line feeds and file name extension *.py
#Openoffice calculate field grow shrink windows
If you are interested in the source code, open the file in a decent text editor (not Windows Notepad), able to handle UNIX line feeds (ASCII 10). When you assign the two routines to shortcuts, buttons or menu entries you'll find them in Macros>user or shared>InsertCalcRows>"insertListRows" and "removeListRows" ("InsertCalcRows" refers to the file "InsertCalcRows.py") Typical path in Linux: ~/.openoffice2/share/Scripts/python/ You may need to create the python directory below Scripts.Ĭ:\Documents and Settings\username\Application Data\2\user\Scripts\python\ Typical path in Linux: /opt/openoffice2.3/share/Scripts/python/ĭue to a bug in v3.0 Python macros work application wide only (fixed in 3.0.1)Ĭopy the Python script to /user/Scripts/python/ Typical path in Windows: C:\Programs\OpenOffice 2.3\share\Scripts\python\ Get administrator access and copy the Python script to /share/Scripts/python/ py ending.Īpplication wide installation for all users:
#Openoffice calculate field grow shrink free
Feel free to change the script's file name, but keep the.
#Openoffice calculate field grow shrink zip
Select the range where the cells have been removed.ĭownload the attached file and extract the python script from the zip archive. Remove rows according to the detected width and height. Take the height of the current selection as row count to be removed. Get the currenly selected range of cells and break silently if the selection is not a single range. The routine called "removeListRows" works like this: Select the remaining empty range(s) for editing. This can not work with the topmost row of a list. Turn off the above mentioned option if it was not set before.ĭetect all formulas in the row above and copy them down into the new rows. Insert rows according to the detected width and height. Turn on the above mentioned option "Expand references when new rows/columns are inserted". Take the height of the current selection as row count to be inserted.

Get the width of the current range (adjacent non-empty cells around the selection) as width of the list range. Get the currently selected range of cells and break silently if the selection is not not a single range. The routine called "insertListRows" works like this: I use them with shortcuts Ctrl+Ins and Ctrl+Del. The following pair of Python macros takes care of all this. Whenever you insert a new row into your spreadsheet list, you have to copy the formulas into the new records. Quite often such a list includes calculated fields:Ĭode: Select all Article Count Price Amount This can be turned off because this behaviour can be quite annoying when designing a calculation model. With this option set, you get your references adjusted even when you insert cells at the end of a list (insert columns at the right side or insert rows directly below a range). One option related to this issue is Menu:Tools>Options.Calc>General, "Expand references when new columns/rows are inserted". Chart ranges, validation lists and conditional formatting are other features where expansion by insertion takes place. New data are affected by the filter/sort operation only if they are entered into newly inserted cells. The same problem occurs when you refresh sorted and/or filtered ranges. All references expand automatically after insertion of new cells in between the existing rows. For instance, the sum of a column =SUM($A$1:$A$99) the will *not* expand to =SUM($A$1:$A$100) when you simply append new data in row 100. One of the drawbacks of list processing in spreadsheets is the risk of losing the right references when you simply append data to the empty cells below the previously used range. Scroll down this topic and find "InsertCalcRows_LO.py.odt"ĮDIT : Replaced the zip packages with text documents and installation macros. LibreOffice changed the way how merged cells are handled on cell insertion which interfered with my macro in strange ways. EDIT : Added a reduced version for LIbreOffice where merged cells are not handled.
