[Solved] Automatically number each row

Discuss the word processor
Post Reply
bla4free
Posts: 7
Joined: Sat Mar 14, 2009 2:26 am

[Solved] Automatically number each row

Post 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
Last edited by bla4free on Wed May 26, 2010 10:46 pm, edited 2 times in total.
OOo 3.2 on 7 x64
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Automatically number each row

Post 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.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Automatically number each row

Post 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.
AOO4/LO5 • Linux • Fedora 23
JohnV
Volunteer
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Automatically number each row

Post by JohnV »

Nice one acknak!
bla4free
Posts: 7
Joined: Sat Mar 14, 2009 2:26 am

Re: Automatically number each row

Post 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!
OOo 3.2 on 7 x64
Post Reply