Issue 73988 - Work with active sheet in Excel file
Summary: Work with active sheet in Excel file
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: jsc
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-29 16:30 UTC by chernolyas
Modified: 2013-02-24 21:09 UTC (History)
3 users (show)

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


Attachments
Archive with source java classes, example XLS file and resulting PDF file (1.49 MB, application/x-compressed)
2007-01-30 09:41 UTC, chernolyas
no flags Details
Correct ExcelWork.java (5.71 KB, text/plain)
2007-01-30 09:58 UTC, chernolyas
no flags Details
Java class which use only OpenOffice API (7.23 KB, text/plain)
2007-02-01 10:27 UTC, chernolyas
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description chernolyas 2007-01-29 16:30:57 UTC
Can't export to PDF file only active list of XLS file when i trying convert XLS 
file. In this way happen convert all sheets in XLS to PDF file and 
option "SelectionOnly" don't work.
Comment 1 kpalagin 2007-01-29 21:52:34 UTC
chernolyas,
please test with latest released version of OO (2.1 at the moment) and reopen, 
attaching sample file.
Comment 2 chernolyas 2007-01-30 09:41:42 UTC
Created attachment 42568 [details]
Archive with source java classes, example XLS file and resulting PDF file
Comment 3 chernolyas 2007-01-30 09:43:56 UTC
I try it for OpenOffice 2.1.  Result same as for OpenOffice 2.2
Comment 4 chernolyas 2007-01-30 09:58:42 UTC
Created attachment 42569 [details]
Correct ExcelWork.java
Comment 5 kpalagin 2007-01-30 10:07:43 UTC
chernolyas,
still can't repro even with your files - exporting selection produces just one-
page .pdf. Please provide detailed step by step instruction.
Comment 6 chernolyas 2007-01-30 10:57:20 UTC
Step-by-step is like that:
I have multi-tab .xls document which i'm trying to render using OpenOffice 2.1. 
The taks is to render only active sheet (1 tab with name "1 pager"). I'm using 
library http://jooreports.sourceforge.net/?q=node/33  and in the end have 
a .pdf which contains entire .xls document instead of only active sheet. If i 
got you right you have .pdf with only active sheet inside although you in the 
same situation as i am. Could you please specify how you get only active page 
in result pdf file (your options of OpenOffice,Excel, PDF Converter)?
Where is i can get step-by-step instructions for work with export from XLS to 
PDF?
Thank you.
Comment 7 kpalagin 2007-01-30 11:22:36 UTC
chernolyas,
I export spreadsheet via File, Export to PDF. In PDF settings dialog I just 
change to "Selection" and get only active sheet.
Comment 8 chernolyas 2007-01-30 11:42:48 UTC
You incorrect understand me.
In GUI client for OpenOffice Server it work fine. But i use API and work with 
OpenOffice Server by network socket. Please, check ExcelWork.java and tell me 
where i wrong. 
Thank you.
Comment 9 chernolyas 2007-01-30 14:10:31 UTC
This is link to equal problem http://www.oooforum.org/forum/viewtopic.phtml?
t=52382. 

When will you correct this problem?
Thank you.
Comment 10 chernolyas 2007-01-31 09:57:37 UTC
Hi kpalagin
I wrote you an email yesterday about my problem with OpenOffice but it seems 
that you didn't recieved it because i've never got an answer from you. 

Could you please help me to understand what is the issue when i use API and 
work with OpenOffice Server by network socket because currently i can't 
render .xls active page using API.

ExcelWork.java contains the code which tries to do that. If it is a bug of 
OpenOffice could you please tell when (in what version perhaps) this will be 
fixed.

Thank you.
Comment 11 niklas.nebel 2007-01-31 15:45:13 UTC
To export a single sheet to PDF, you have to pass it to the PDF filter in the
MediaDescriptor's FilterData. FilterData is a sequence of PropertyValue, one
supported entry is "Selection", into which you can put a sheet object.
Comment 12 chernolyas 2007-02-01 10:27:16 UTC
Created attachment 42626 [details]
Java class which use only OpenOffice API
Comment 13 chernolyas 2007-02-01 10:29:35 UTC
Dear nn

I added java class which use only OpenOffice API (without JOOConverter). After 
start i get same result (PDF file consist OpenOffice Calc data).
Comment 14 niklas.nebel 2007-02-02 18:00:52 UTC
In the attached code, you don't assign to filterProps.
If you get the sheet from the document by its name, there's no need to involve
the view. Just pass the object you get from the document.
Comment 15 chernolyas 2007-02-05 15:53:17 UTC
I've finally understood the problem and took care of it. Thank you very much for
your help.