Issue 75074 - Accessing Spreadsheet through Impress document using OOo API
Summary: Accessing Spreadsheet through Impress document using OOo API
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: jsc
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-02 19:45 UTC by freshofftheboat
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description freshofftheboat 2007-03-02 19:45:42 UTC
I was wondering if anyone could point me in the right direction. I created an 
Impress slide template that has several spreadsheets on it. I have written a 
Java program that I want to accesss and populate the spreadsheets. I am able 
to access the spreadsheets as draw objects but I cannot find a way to access 
the individual cells inside the spreadsheets. 

Here is a sample of my code: 


XMultiServiceFactory xFactory = 
(XMultiServiceFactory )UnoRuntime.queryInterface( 
XMultiServiceFactory.class, xLoadDocument ); 

XDrawPagesSupplier xDrawPagesSupplier = 
(XDrawPagesSupplier)UnoRuntime.queryInterface( 
XDrawPagesSupplier.class, xLoadDocument ); 
XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages(); 
XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface( 
XDrawPage.class, xDrawPages.getByIndex( 0 )); 

XSpreadsheetDocument firstDoc = 
(XSpreadsheetDocument)UnoRuntime.queryInterface(XSpreadsheetDocument.class, 
xDrawPage.getByIndex(0)); 

XSpreadsheets xSpreadsheets = firstDoc.getSheets(); 
XIndexAccess xSheetIndexAccess = 
(XIndexAccess)UnoRuntime.queryInterface(XIndexAccess.class, 
xSpreadsheets); 


XSpreadsheets xSpreadsheets = 
(XSpreadsheets)UnoRuntime.queryInterface
(XSpreadsheets.class,xDrawPage.getByIndex(0)); 

Object sheet1 = xSpreadsheets.getByName("Sheet1"); 
XSpreadsheet xSpreadsheet = 
(XSpreadsheet)UnoRuntime.queryInterface(XSpreadsheet.class, sheet1); 

XCell xCell = xSpreadsheet.getCellByPosition(0,0); 



Thx...
Comment 1 freshofftheboat 2007-03-04 07:27:04 UTC
Another method that I was trying to extract the embedded object out of Impress 
Document was enumerate through the shapes by using createEnumeration().  I saw 
several examples from the issues database of how to extract data out of a 
TextDocument but not Impress Document.  The big difference is that I am not 
sure at what level(container--XDrawPagesSupplier, or XDrawPages, or just 
XDrawPage) of the document to createEnumeration on.
Comment 2 cno 2007-03-05 18:51:14 UTC
Hi Sailor :-)

Issutracker is not for Anwers & Questions.
You can use the OOoForum.org or dev@api.openoffice.org.

Futhermore: sorry I can't answer your question directly. 
But sure the SDK on http://api.openoffice.org will hold the answer to at least
your second question. (Since I mainly work with OOoBasic, I use XRay for
investiagations.)

Cheers,
Cor
Comment 3 jsc 2007-03-21 16:56:54 UTC
cornouws has already mentioned that the issue trcker is not asking questions.

Sorry but this is an invalid task, please use the mailing list.
Comment 4 jsc 2007-03-21 17:00:28 UTC
closed