How To Insert Multiple Sheets in Calc Document through BASIC- Macro ? Any Code

Hi Friends, Can Anybody show me the LO-Basic - Macro Code For " Insert Multiple Sheets " In Calc Document … In GUI Mode its Possible…Like below Screen Shots…

image

image

Do you mean loop with .insertNewByName?

1 Like

Hi John Sun,
Without Loop - Any Code ?

Hallo

Sub Main

 sheets = thisComponent.Sheets
 for i = 3 to 10
  sheets.insertNewByName("funnyname" & i , sheets.Count )
 next 

End Sub
1 Like

Hi Karolus,

Thanks, Its working … But, “” With Out - Loop “” Is it possible any Code ? there…

NO IT IS NOT POSSIBLE WITHOUT LOOP!

1 Like

Thanks Karolus…