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

Spreadsheets inside a spreadsheet document not found via UNO

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


Joined: 09 Apr 2008
Posts: 3

PostPosted: Thu May 14, 2009 6:34 am    Post subject: Spreadsheets inside a spreadsheet document not found via UNO Reply with quote

Hello,

using UNO and Java I have written a document converter that extracts text content from all kinds of office documents. A few weeks ago I found two MS Excel documents which contain several spreadsheets each. When I open them directly (by clicking on the file icon, for example), they open correctly in OpenOffice.org (and in MS Excel) and I can see all the spreadsheets inside.
However, when I open them via UNO, only one empty spreadsheet is found.

I used the same method of traversing through spreadsheet documents with UNO and Java on lots of other Excel and OpenOffice spreadsheet documents before and it always worked flawlessly, so I guess it has something to do with these specific documents.

I reported this behaviour as a bug at http://www.openoffice.org/issues/show_bug.cgi?id=101134 and also attached the example files there. Since I got no reaction so far and I am not 100% sure that it really is a bug, could somebody please try to open these files via UNO and try to access the spreadsheets inside (and possibly tell me what I am doing wrong)?

Thanks,

Holger

P.S.: a short extract of my Java source to access the document ("this.xComponent" holds the XComponent that I got from calling "loadComponentFromURL")
-------------------------------------------------------------------
XSpreadsheetDocument xSpreadsheetDocument =
( XSpreadsheetDocument ) UnoRuntime.queryInterface ( XSpreadsheetDocument.class, this.xComponent );

XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets();

XIndexAccess xIndexAccess =
( XIndexAccess ) UnoRuntime.queryInterface ( XIndexAccess.class, xSpreadsheets );

System.out.println ( "### XIndexAccess count: " + xIndexAccess.getCount() ); // here I get only "1"
-------------------------------------------------------------
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