Page 1 of 1

[Solved] Automatically number each row

Posted: Wed May 26, 2010 3:27 pm
by bla4free
Hi. We are switching from WordPerfect to OpenOffice at my job and I'm having a little difficulty converting one of our documents over to ODF. I'm recreating the document from scratch so I'm using a clean document--I'm not importing any WordPerfect docs into OpenOffice. One particular document we use has a table in it. What I would like to do is have the numbers on the left automatically number themselves, starting with 1. Right now, the numbers have been manually entered. Is there a way I can have each row number itself so when a user deletes/inserts a row, the numbering is not affected? Thanks!
oorows.png

Re: Automatically number each row

Posted: Wed May 26, 2010 5:21 pm
by Hagar Delest
You can create a Number range field (CTRL+F2, then Variables tab). Call it 'Row' for example (in the dialog, put in the value field 'Row+1'). Insert it in the first row and then you can copy and paste it in the other lines.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.

Re: Automatically number each row

Posted: Wed May 26, 2010 5:44 pm
by acknak
You can also use normal paragraph numbering: just select the cells in that column and press the "Numbering On/Off" button on the toolbar.

You probably don't want the indent that comes with the default numbering; just put the cursor in the first numbered cell and press Shift+Tab.

If you want plain numbers, with no extra punctuation, click on the Bullets & Numbering button, then the "Options" tab and remove everything from the "Before" and "After" fields, then, on the "Position" tab, change "Numbering followed by" to "Nothing".

PS: I don't see any big advantage/disadvantage in either of these approaches. Either one should work fine.

Re: Automatically number each row

Posted: Wed May 26, 2010 9:51 pm
by JohnV
Nice one acknak!

Re: Automatically number each row

Posted: Wed May 26, 2010 10:47 pm
by bla4free
acknak wrote:You can also use normal paragraph numbering: just select the cells in that column and press the "Numbering On/Off" button on the toolbar.

You probably don't want the indent that comes with the default numbering; just put the cursor in the first numbered cell and press Shift+Tab.

If you want plain numbers, with no extra punctuation, click on the Bullets & Numbering button, then the "Options" tab and remove everything from the "Before" and "After" fields, then, on the "Position" tab, change "Numbering followed by" to "Nothing".

PS: I don't see any big advantage/disadvantage in either of these approaches. Either one should work fine.
I went with your suggestion because the fields option wouldn't insert the number into a newly created row, but the bullet/numbering option did. Thanks!