To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=75074
                 Issue #|75074
                 Summary|Accessing Spreadsheet through Impress document using O
                        |Oo API
               Component|api
                 Version|OOo 2.1
                Platform|PC
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|FEATURE
                Priority|P3
            Subcomponent|code
             Assigned to|jsc
             Reported by|freshofftheboat





------- Additional comments from [EMAIL PROTECTED] Fri Mar  2 19:45:42 +0000 
2007 -------
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...

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to