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

Delete a row if section inside is hidden

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


Joined: 26 May 2012
Posts: 1

PostPosted: Sat May 26, 2012 12:41 am    Post subject: Delete a row if section inside is hidden Reply with quote

In writer document, i have a table with rows
Some rows contain hidden / visible sections

I wanted to delete rows with hidden sections
Is there a way to do that.

The beginning of my code :

Code:

Sub deleteRow

dim PysDoc as object, PysTable as object, PysCell as object
dim PysNum as integer

PysDoc = thisComponent

 
PysTable = PysDoc.TextTables.getByName("Mytable")

for PysNum = ubound(PysTable.CellNames) to lbound(PysTable.CellNames) step -1

PysCell = PysTable.getCellByName(PysTable.CellNames(PysNum))

'I wanted to delete a row if a section inside is not visible
if XXXXXXXXXXXXXXXXX Then PysTable.Rows.removeByIndex(PysNum,1)

next PysNum

End Sub

Back to top
View user's profile Send private message
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