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

How to select two sheets in SpreadsheetDocument?

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


Joined: 09 Oct 2009
Posts: 2

PostPosted: Fri Oct 09, 2009 1:00 am    Post subject: How to select two sheets in SpreadsheetDocument? Reply with quote

i want to select two sheets and print them. i think XMultiSelectionSupplier may be useful, but i don't know how to get an instance of XMultiSelectionSupplier.

Help me!! Thank you!!
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri Oct 09, 2009 1:37 am    Post subject: Reply with quote

Create a c.s.s.sheet.SheetCellRanges collection from the document, add range addresses from more than one sheet and pass the SheetCellRanges to the controller's select method.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
lixiang
Newbie
Newbie


Joined: 09 Oct 2009
Posts: 2

PostPosted: Fri Oct 09, 2009 2:53 am    Post subject: Reply with quote

Villeroy wrote:
Create a c.s.s.sheet.SheetCellRanges collection from the document, add range addresses from more than one sheet and pass the SheetCellRanges to the controller's select method.


would you give me an example? thank you!
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri Oct 09, 2009 3:16 am    Post subject: Reply with quote

Come on! You don't even tell us your office version or the language you are using. My answer is as short as your question. You can look up com.sun.star.sheet.SheetCellRanges with all it's properties and methods in the API documentation or using the object inspector of your choice.
http://www.oooforum.org/forum/search.phtml gives dozends of examples for SHeetCellRanges

The volunteers on this forum are no human macro recorders Exclamation
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
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