OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Alternating Row Insertion Macro [SOLVED]

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ByteKiller
Newbie
Newbie


Joined: 21 Sep 2009
Posts: 3

PostPosted: Mon Sep 21, 2009 1:57 am    Post subject: Alternating Row Insertion Macro [SOLVED] Reply with quote

Hello there, first off I am new to forums so hello to all! I did a search to see if anything came close to what I was looking for but was greeted with several hundred pages of results many of which had no relevance whatsoever so I do apologise if this has previously been discussed.

I am new to OpenOffice Basic but I managed to write a macro for the insertion of rows into a spreadsheet. However, what I want to accomplish is this.

For a specified range of rows, loop through range and insert alternating rows (i.e. insert a row, skip to next row, insert another row and so on) as opposed to inserting them one after the other.

I'm certain this is possible in OpenOffice but I am having great trouble in writing the macro. Can anyone give me any pointers or assistance?


Last edited by ByteKiller on Mon Sep 21, 2009 6:47 am; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Sep 21, 2009 2:48 am    Post subject: Reply with quote

http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/SheetCellRanges.html keep references to a collection of ranges so you can insert while keeping the references to the same ranges.
http://www.oooforum.org/forum/viewtopic.phtml?t=71668&highlight=sheetcellranges
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
ByteKiller
Newbie
Newbie


Joined: 21 Sep 2009
Posts: 3

PostPosted: Mon Sep 21, 2009 6:47 am    Post subject: Reply with quote

Thank you very much for the links! I should have looked at the API documentation in greater depth than I did because I have managed to write what I wanted now. Thank you once again!
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group