Page 1 of 1

[Solved] Insert a new sheet at a certain position

PostPosted: Mon Jun 25, 2018 6:35 am
by MINTHETNAUNG
Hi there, I have been looking into this topic in this forum but I could not find a solid solution that would meet the requirement. Let's say I have two sheets in Calc document: Product and Table. Then I want to insert a new sheet next to the Product sheet but not like inserting a new sheet at the end of all sheets (the solutions I found so far insert at the end of all sheets. I don't want it.). So, how could I insert a new sheet at a certain position with Calc Macro?

Re: Inset a new sheet at a certain position

PostPosted: Mon Jun 25, 2018 7:39 am
by Zizi64
See the
Code: Select all   Expand viewCollapse view
insertNewByName(name, index)

function in Andrew Pitonyak's free macro book (version 4):
http://www.pitonyak.org/OOME_4_0.odt

(It creates a new spreadsheet and insert it at the specified location with the supplied name.)