Re: Encryption/password protected excel/word files

2007-04-17 Thread David Fisher
Since the apache servers are in the United States, and the Apache  
Foundation is a US not for profit corporation, all projects are  
required to meet US Export regulations with regard to encryption  
technology.


See http://www.apache.org/licenses/exports/

Regards,
Dave

On Apr 17, 2007, at 12:10 PM, Rainer Klute wrote:


Andrew C. Oliver schrieb:

Guys lets stay away from encryption.  We'd have to do all this
registering with the government and a whole lot of hassle for not  
much

benefit.  Lame encryption to boot.


This depends. We here in Europe or at least here in Germany don't have
to do any registering with the government for encryption/decryption.

Best regards
Rainer Klute

   Rainer Klute IT-Consulting
  Dipl.-Inform.
  Rainer Klute E-Mail:  [EMAIL PROTECTED]
  Körner Grund 24  Telefon: +49 172 2324824
D-44143 Dortmund   Telefax: +49 231 5349423

OpenPGP fingerprint: E4E4386515EE0BED5C162FBB5343461584B5A42E





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: 3.0 release (and maven)

2007-04-17 Thread David Fisher

Hi Jörg,

I'm replying this to the poi-dev list as well as poi-user.

It seems that Nick (who is building the current POI 3.0 RC  
candidates) could use some help with Maven.



http://issues.apache.org/bugzilla/show_bug.cgi?id=39977

--- Additional Comments From [EMAIL PROTECTED]  2007-04-10  
02:50 ---

What do we need to change to fix this? (I'm not a maven user myself)

The pom file is auto-generated by the maven-dist ant task, based on  
a template
that's in svn. Any patches to build.xml or the template poi.pom  
appreciated :)




Are the guy? I hope so. A release would be sweet!

BTW - I would be helpful to the guys clearing bugs before release if  
anyone who has submitted a bug in bugzilla would test against RC3 and  
provide a result. If your bug is still there, and you have not  
already done so, please provide a test case.


I expect that large HSSF / lower memory impact is an RFE for 3,X or  
4.0. I have an idea (I'm sure that there are a few others) but I'm  
not talking about it until the 3.0 release is DONE!


Best Regards,
Dave


On Apr 17, 2007, at 2:29 PM, Jörg Hohwiller wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi there,

everybody is waiting for the 3.0 release and everything in head
is better than an almost 3 years old release. Anyways take the time  
you

need to have a release that you are happy with.

I already migrated my project from 2.5.1-final-20040804 to 3.0-rc3  
with good
results. I did not see the point for binary incompatibility of HSSF  
(was it
UnicodeString instead of String as return-type? cant remember) but  
that does not

matter for me.
The WordExtractor is also very useful and will allow me to kick out  
tm-extractors.


Are you planning to put the 3.0 release into the maven repository  
as soon as it
is out? I would be very pleased if this could happen quickly. If I  
can help

anyhow on this task, just let me know.

Is there something to discuss, that could be done now rather than  
after the
release has been pulled out? E.g. if the goupId should change from  
poi to

org.apache.poi what would make sense (lucene did do this too).

Regards
  Jörg
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJSAgmPuec2Dcv/8RAsU3AJ9dTh0Q1E7iiqnKrRriaq8MjHQe2wCgj+H7
cm5icKwYfePhr10EafiM6Ww=
=bMdG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Getting class file has wrong version error on poi-scratchpad-3.0-rc2 jar

2007-03-29 Thread David Fisher

That class file was compiled with JDK 5.0

See http://blogs.sun.com/sundararajan/entry/java_class_ic_errors

On Mar 29, 2007, at 2:25 PM, Karr, David wrote:

Obviously, I was wrong to refer to this as the scratchpad jar.   
It's the

main poi jar.


-Original Message-
From: Karr, David
Sent: Thursday, March 29, 2007 12:06 PM
To: POI Users List
Subject: Getting class file has wrong version error on
poi-scratchpad-3.0-rc2 jar

I'm trying to use 3.0rc2, and I'm trying to use the
scratchpad jar for the first time.  I'm using JDK 1.4.2.
When I try to compile my code with Ant, I get the following:

bad class file:
...\lib\poi-3.0-rc2-20070329.jar(org/apache/poi/hssf/model/Wor

kbook.clas

s)
class file has wrong version 49.0, should be 48.0 Please
remove or make sure it appears in the correct subdirectory of
the classpath.
import org.apache.poi.hssf.model.Workbook;

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: POI251: Worked fine reading one spreadsheet, new one throws RecordFormatException creating workbook

2007-03-27 Thread David Fisher
You might try the latest 3.0 RC1 at http://people.apache.org/~nick/ 
POI-3.0-RC1/


I know that bugs related to macros were repaired in the last couple  
of months.


Regards,
Dave

On Mar 27, 2007, at 6:01 PM, Karr, David wrote:


I noticed from a FAQ entry that this could happen if the spreadsheet
uses Excel features not supported by POI.  Is there anything I can  
look

at in Excel that will give me a clue on this?


-Original Message-
From: Karr, David
Sent: Tuesday, March 27, 2007 3:23 PM
To: POI Users List
Subject: POI251: Worked fine reading one spreadsheet, new one
throws RecordFormatException creating workbook

I have an app using POI 2.5.1 that reads a spreadsheet and
generates some other files from it (in text files).  I had it
working with one version of the spreadsheet.  I now have a
new version of the spreadsheet that is similar, but slightly
different.  I need to update the app to use the new spreadsheet.

I use the following code to initially load the spreadsheet:

POIFSFileSystem fileSystem  =
new POIFSFileSystem(new
FileInputStream(getExcelInputFile()));
HSSFWorkbookworkbook= new
HSSFWorkbook(fileSystem);
HSSFSheet   worksheet   =
workbook.getSheet(getWorksheetName());

When I run my app with the new spreadsheet, the creation of
the HSSFWorkbook fails with the exception info that follows
this.  Again, the previous version of the spreadsheet worked
fine here.  What could be wrong here?

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo
nstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
gatingCons
tructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFa
ctory.java
:224)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordF
actory.jav
a:160)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.init(HSSFWorkbook
.java:163)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.init(HSSFWorkbook
.java:130)
at
com.wamu.uia.riskrating.genmessages.GenRiskRatingMessageFiles.
go(GenRisk
RatingMessageFiles.java:282)
at
com.wamu.uia.riskrating.genmessages.GenRiskRatingMessageFiles.
main(GenRi
skRatingMessageFiles.java:221)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.poi.hssf.record.UnknownRecord.init(UnknownRecord.java: 
62)

at
org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord
.java:57)
at
org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
at org.apache.poi.hssf.record.Record.init(Record.java:55)
at
org.apache.poi.hssf.record.ObjRecord.init(ObjRecord.java:61)
... 10 more
org.apache.poi.hssf.record.RecordFormatException: Unable to
construct record instance, the following exception occured: null
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFa
ctory.java
:237)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordF
actory.jav
a:160)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.init(HSSFWorkbook
.java:163)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.init(HSSFWorkbook
.java:130)
at
com.wamu.uia.riskrating.genmessages.GenRiskRatingMessageFiles.
go(GenRisk
RatingMessageFiles.java:282)
at
com.wamu.uia.riskrating.genmessages.GenRiskRatingMessageFiles.
main(GenRi
skRatingMessageFiles.java:221)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Numeric Cell Type not consistent

2007-03-01 Thread David Fisher

Ah yes, the difference between being rational and precise :-D

In programming fortran for IBM 370s you couldn't say:

IF ( A.EQ.1.0 )

You had to say something like:

IF ( ABS(A-1.0).LT.EPSILON )

where EPSILON = 0.0001

REALly

My Finance Professor Father who compiled the first statistically  
reliable database of NYSE stock prices (Monthly 1925 - 1964 - the  
CRSP monthly database still maintained by the GSB at the University  
of Chicago ) has always remarked about the trouble he had when he had  
to convert to the IBM 360 in the early 60's. A REAL number went from  
being in a Word of 6 bytes of 6 bits to Words of 4 bytes of 8 bits.  
His dataset had to be converted from SINGLE to DOUBLE because the  
loss of precision of going from 36 bits to 32 bits adversely effected  
his results.


A good computer scientist must know how precise their calculations  
are and make the trade offs.


Takahiro is encountering the fact that different implementations have  
made their own decisions about numeric representations and it can be  
hard to know how POI's are different from Open Office or Microsoft's.


For information on floating point: http://en.wikipedia.org/wiki/ 
IEEE_754  and follow some of the external links.


Regards,
Dave

On Mar 1, 2007, at 11:37 AM, Andrew C. Oliver wrote:

You do realize that floating point numbers are always  
approximates?  Both of the numbers below

are correct ;-)



Are you sure this is not a bug of POI? This is not a random  
problem. It
always does so for the file. Also I can't enforce the decimal  
places. Also when I save as CSV and then back to XLS, this doesn't  
happen.


I debugged a little and figure out that the LittleEndian.getDouble 
(final
byte[] data, final int offset) method returns different long bits  
value

(one last digit is different), 4562254508917369340 (Corrent) and
4605101755772172238 (Wrong), which is pass to the Double to get the
double value.

I have attached the sample file so that the problem can be  
reproduced. This file is created with the open office 2 by copying  
paste cells from

the problematic ms excel xp file.

Takahiro
   
- 
---


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



--
No PST Files Ever Again
Buni Meldware Communication Suite
Email, Calendaring, ease of configuration/administration
http://buni.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Autosizing question:

2007-01-24 Thread David Fisher

Maybe it is time to have a PPT to FOP translator.

Yegor has done Postscript to Escher Drawing conversion for me  
including fonts it is not perfect but his current efforts are a lot  
better than his first one.


Yegor has HSLF reorganization to do, but PPT - FOP for PDF, SVG, etc  
is on my development list. Q2 - Q3 time frame.


Yegor?

Regards,
Dave Fisher

On Jan 24, 2007, at 4:28 PM, Daniel Noll wrote:


Andrew C. Oliver wrote:
Its actually more compounded than that.  You can basically do this  
with
Java's AWT Font/FontMetrics classes but the sizes are incompatible  
with
Windows fonts (let alone Mac et al).  Someone has to record the  
data for
Windows fonts and or an API that reads the font files and  
calculates them.


Well, the FOP project has a TTFReader already... maybe it's time  
for them to push all that into a font-commons package so that POI  
can depend on it. :-)


Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280  
0699
Web: http://nuix.com/   Fax: +61 2 9212  
6902


This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: HSSF - Generating large spreadsheets in streaming manner?

2007-01-12 Thread David Fisher
Accept state and follow Michael's suggestion (which is how we do it  
with our dynamic PPT, XLS and PDF) is to build the file and then  
serve the file's bytes. While the content is creating we show a  
progress with a continue working button, if that is clicked then we  
have a menu bar spot that tracks the progress and when the build  
thread has completed if the progress is still going the download  
proceeds automatically, if they have continued working then the menu  
bar updates to let them the document is ready and they can select it  
for download at their leisure.






Heck according to ComputerWorld this approach defeats the recently  
discovered Adobe Reader web browsing vulnerability issue.


Other technical reasons:

IE tends to think it knows what type of file it is being served by  
looking at the beginning, guessing and then re-requesting the file.  
Do you want to be building that 50MB file twice? Most of us don't.  
This is the standards flogging trick that Microsoft used to beat  
Netscape with their first IE.


Alternatively, if you are doing nothing except serving 50MB of data w/ 
o any style attributes then why not just serve up a CSV file? If you  
set the mime-type correctly that will stream out just fine.


Regards,
Dave

On Jan 12, 2007, at 2:33 PM, Sanjiv Jivan wrote:

When you go to download a file from the web you see a download  
dialog with a
progress bar. Would you prefer that when you want to download ,say,  
a 50 MB
zip file (which will take more than a second or two) off the  
internet that

it follow the workflow you describe?

The fact that the Excel spreadsheet is generated dynamically is an  
internal
detail. Again, we're talking about a download that takes a few  
minutes and
not hours. Why should the end user go about a different workflow to  
download

a file?


On 1/12/07, Donahue, Michael [EMAIL PROTECTED] wrote:


Sanjiv -

Strictly speaking as a web developer, this is a very bad approach to
dealing with a task that may take more than a second or two complete.
Typically, a web application should never make the user wait for more
than a few seconds to completely load the next page.  I don't think I
would want to take your approach for a think client either.

In the situation you described, it would be better to tell the  
user that
their request has been accepted and as soon as it is complete they  
will
be notified through some other mechanism that they can download or  
view

the results.  This could be through a screen/window pop.

There still might be a few good places that it might make sense to  
have

a streaming API, I'd prefer to see effort spent on tasks that have a
broader utilization curve like the recently added comments support.

Lastly; THANK YOU!! to all of the POI Project developers for all of
their efforts to make POI better.

-Original Message-
From: Sanjiv Jivan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 12, 2007 12:41 PM
To: POI Users List; [EMAIL PROTECTED]
Subject: Re: HSSF - Generating large spreadsheets in streaming  
manner?


I think that having a streaming API would be very useful and its not
because
of trying to generate a massive non human readable spreadsheet.  
You have

to
factor in the time it takes to build that data to be used for the
spreadsheet too.

Consider a use case where a user is trying to download a spreadsheet
with
500 - 1000 rows but the logic involved in getting the data for the
spreadsheet takes around a minute. Without a streaming API, when a  
user
tries to download such a file they click on the link and basically  
the
browser waits for 1 minute and only then pops up a save dialog  
since the

contents of the spreadsheet could only be written out to the response
stream
after the entire spreadsheet was generated. Had there been a  
streaming

API,
the contents could have been written to the response stream on the  
fly

and a
nice download dialog with progress bar would have displayed by the
browser.


On 3/10/06, Andrew C. Oliver [EMAIL PROTECTED] wrote:

 not yet.  Demand for the cocoon serializer hasn't been very high  
so it
 is mostly deprecated (unless there is some massive uptake of  
support

for
 it).

 Okay its time for my yearly rant on this subject (not aimed at
you...you
 just reminded me I hadn't done it this year):

 I'm always a little curious about this.  XLS is a HORRIBLE format
(which
 is why I started POI, I wanted to do something difficult).  It is a
 HORRIBLY inefficient format and WAS NOT DESIGNED to stream.  Yet
people
 generate massive sheets in it.  My pensiveness is that no human is
 likely to read such a large sheet or be able to do anything
patricularly
 useful with it.  So who are these sheets for?  Often it turns  
out they

 are some kind of data transfer, which is frankly BAFFLING.  Why?
 Because I could do the same transfer with like 1/10th of the  
storage,

 bandwidth, CPU, etc in a more well-thought out (or at least
lightweight)
 format.  Yet I saw a spreadsheet 

Re: help with POI Co.

2007-01-09 Thread David Fisher

On Jan 9, 2007, at 2:28 PM, Joerg Hohwiller wrote:
Besides I used the official POI release which is very old. I did  
NOT try the

HEAD from svn.


Jörg:

You want poi3_alpha3, or something like that. (I have Yegor do all my  
POI work for me :-)


Use the latest. I'm sure Nick is talking about it and definitely  
*not* the ancient, decrepit, last official release.


A new official release is in the works when the POI guys work out  
some details with the Jakarta overseers. I *think* the community will  
vote to release current stuff soon (in the next week / month?)


Regards,
Dave Fisher



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: CorruptPowerPointFileException

2006-12-24 Thread David Fisher

Eitan,

Yegor also asked what software was used to produce this file. It  
would really help to know this information, if nothing else it would  
help prioritize its investigation.


Shalom,
Dave Fisher

On Dec 24, 2006, at 8:30 AM, Eitan Gur wrote:


Added the file to the bug

-Original Message-
From: Yegor Kozlov [mailto:[EMAIL PROTECTED]
Sent: ג 19 דצמבר 2006 15:09
To: POI Users List
Subject: Re: CorruptPowerPointFileException

Hi

We are investigating this problem.
See http://issues.apache.org/bugzilla/show_bug.cgi?id=41176
You can attach the file to this bug.

Do you know what software was used to produce this file? PowerPoint or
OpenOffice or whatever else? Anything special about this file?

Yegor

EG Hi

EG I get the following exception, trying to instantiate a  
SlideShow with a specific PPT file, I get:


EG org.apache.poi.hslf.exceptions.CorruptPowerPointFileException:  
The PowerPoint file had a broken first SlideListWithTexts. This  
should only contain either MainMasters, or Slides, but it contained

EG a mix of both (1 slides and 1 masters)
EG at  
org.apache.poi.hslf.usermodel.SlideShow.buildSlidesAndNotes 
(SlideShow.java:352)
EG at org.apache.poi.hslf.usermodel.SlideShow.init 
(SlideShow.java:121)


EG (I couldn't send the file as the mailer-daemon doesn't allow me).
EG When I roll-back to the version I had previously (also attaced)  
- there's no problem.


EG Any idea why?

EG 10x


EG 
EG Eitan Gur
EG RD
EG AxisMobile Ltd.
EG Consumer Mobile Email
EG Tel: Int +972-3-768 5538
EG Mobile: Int +972-54-3105142
EG Fax: Int +972-3-768 5556
EG [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
EG 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Cell comments

2006-11-27 Thread David Fisher
The development plan has been made and developer (Yegor Kozlov -  
Dinom, Moscow) time is being scheduled.


It is likely that this feature will be in place in POI by Jan 1,  
2007, if not sooner.


Regards,
Dave Fisher
JM Lafferty Associates
Chicago, IL, USA

On Nov 27, 2006, at 4:16 PM, Daniel Noll wrote:


Sanjiv Jivan wrote:
I'm interested in this as well. Can anyone confirm that this  
feature does

not exist in POI?


You can confirm it yourself: http://issues.apache.org/bugzilla/ 
show_bug.cgi?id=10215


Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280  
0699
Web: http://nuix.com/   Fax: +61 2 9212  
6902


This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: How to print excel files automatically

2006-09-12 Thread David Fisher

Kruce,

http://j-integra.intrinsyc.com/

Before we switched to using POI for creation we used this package to  
script the creation of image only PPT by driving PowerPoint via COM.  
It cost $5000 per server 3 years ago.


You might also look into openoffice.org if you are not on a windows  
machine.


Regards,
Dave

On Sep 12, 2006, at 2:43 AM, Anthony Andrews wrote:

As far as I am aware (and bear in mind that I could very well be  
wrong) HSSF is an API that allows you to generate Excel  
spreadsheets and does not have any support for printing. I managed  
to get around exactly the same problem by using OLE but this is a  
far from perfect solution as it caused almost as many problems as  
it solved; it is however one possible solution.


I know there is a tool that someone wrote that is a wrapper around  
JNI, making it far more easy to use external applications in a way  
that mimics Microsoft's COM model. I cannot remember the name at  
the moment but will have a dig around on my PC as I seem to  
remember testing it sometime in the past.


kruce lee [EMAIL PROTECTED] wrote: Hi everybody
How to print a excel file automatically when I get the file path or  
resource.

Can someone give me a snippet.
Any help would be highly appreciated
kruce.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




-
Get your email and more, right on the  new Yahoo.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: TextBox bug

2006-07-13 Thread David Fisher
I know that Yegor knows less about auto-fill TextBoxes than the  
other types.


It is time for him to find out ;-)

Regards,
Dave

On Jul 13, 2006, at 9:31 AM, Nick Burch wrote:


On Thu, 13 Jul 2006, Tales Paiva Nogueira wrote:
This piece of code doesn't work in all cases, I made some tests  
and the

NullPointerException still happens.


I wonder if in this case, it's a TextBox that doesn't actually have  
any text in it. I leave it for Yegor to confirm or deny though,  
since he knows the most about TextBoxes :)


Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: [NEW] - RE: Excel Sheet Title - Message is from an unknown sender

2006-03-08 Thread David Fisher

It is very important that:

(1) You don't output anything to your response you setHeader and  
setContentType.


  response.setHeader(Content-disposition, attachment;filename= +  
file);

  response.setContentType( application/vnd.ms-excel );

(2) It is also important if using JSP in say Tomcat that you use a  
Servlet instead. JSPs are NOT intended for binary file types. The  
spec says text only.


  We get away with sending (1) through JSP, but you will get in big  
trouble with PDFs:


(4) MS IE has sticky features for remembering download/save as/inline  
choices. I'm a MacOSX/Solaris user, avoiding windows and it seems to  
me that the place to undo these settings moves a lot. It is in a  
strange, non-web location in the other explorer - Windows Explorer  
that is reached from My Documents or My Computer


You should use the most accurate mime-type possible. Avoid  
application/octet-stream - as some other website's interaction for  
a completely different unknown file type could cause stickiness later.


If the user decides on certain settings he could defeat all of your  
attempts. I suggest that you avoid automatic choices.


(5) Inline vs. attachment

Using inline for excel and ppt will avoid the download and, if the  
files are very large, may make it look like nothing is happening.


I would not use inline unless your client requires it.

I've learned all of this the hard way

Good luck.
Dave

On Mar 8, 2006, at 12:35 PM, [EMAIL PROTECTED] wrote:


Instead of attachment (in your setHeader call), have you tried inline?
I'm not sure that it would work in Firefox, but it might work,  
also, you

would have trouble doing a save as (it would have an extension of
html, I think.)

Jeff

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 10:28 AM
To: POI Users List
Subject: [NEW] - RE: Excel Sheet Title - Message is from an unknown
sender

That didn't do it either but thanks for trying.

Jody





Tahir Akhtar [EMAIL PROTECTED]
03/08/2006 01:07 PM
Please respond to
POI Users List poi-user@jakarta.apache.org


To
'POI Users List' poi-user@jakarta.apache.org
cc

Subject
RE: Excel Sheet Title






You can also try setting content type to application/octet-stream .

This helps in many cases. I used it for downloading csv files and it
worked
correctly in latest version of both IE and Firefox.
Regards,
Tahir

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 10:32 PM
To: POI Users List
Subject: RE: Excel Sheet Title

Thank you.  I did read it.  But it only deals with effectively
downloading

a file.  When I use that, I get a save dialog with an unknown filetype
in
I.E. (it works better in Firefox), no view dialog, like I want.  If I
use:

response.setContentType(application/vnd.ms-excel);
response.setHeader(Content-Disposition, attachment; filename= +
filename);

I get a view dialog but the header doesn't take in I.E.

Maybe I will not be able to do this?

Jody





Tahir Akhtar [EMAIL PROTECTED]
03/08/2006 12:12 PM
Please respond to
POI Users List poi-user@jakarta.apache.org


To
'POI Users List' poi-user@jakarta.apache.org
cc

Subject
RE: Excel Sheet Title






Jody,
I recommend you look into the tip at
http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html

Not a long read.

It explains the reason why the browsers behave strangely when handling
downloads and offers some good suggestions. I remember it recommends
using
res.setContentType(application/x-download); to avoid some common
gotchas.

Regards,
Tahir


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 10:05 PM
To: POI Users List
Subject: RE: Excel Sheet Title

I don't really want to save the file right away.  I want to let the  
user


view it and I want to specify the title and suggest the filename when
they


save it.  This works in Firefox:

response.setContentType(application/vnd.ms-excel);
response.setHeader(Content-Disposition, attachment; filename= +
filename);

But not IE.  IE just show the servlet name as before.

Thanks again.

Jody





Tahir Akhtar [EMAIL PROTECTED]
03/08/2006 10:04 AM
Please respond to
POI Users List poi-user@jakarta.apache.org


To
'POI Users List' poi-user@jakarta.apache.org
cc

Subject
RE: Excel Sheet Title






Jody,
You need to set content-disposition header

// Set the headers.
res.setContentType(application/x-download);
res.setHeader(Content-Disposition, attachment; filename= +
filename);

For more details see
http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html

Hope this helps.

Regards,
Tahir

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 7:53 PM
To: poi-user@jakarta.apache.org
Subject: Excel Sheet Title

Is there any way to change the default file save name and title when I
create a spreadsheet?  Right now it is the name and path of my  
servlet.


Re: HSLF

2006-03-01 Thread David Fisher

Hi,

I'm sure that others will answer with the details, but yes you can  
generate PPT w/o PowerPoint from java using POI.


Styles are possible and so are object oriented graphics, tables, etc.

My third party developer, Yegor, has extended POI to do a lot of this  
and has been making contributions to POI through Nick.


Regards,
Dave Fisher



I am new in this mailinglist, but I am thinking of using POI for a  
project and have several questions!
I wanna generate out of Java a Powerpoint file! But I cant find  
HSLF in any Jar-File, where can I download that?
Is it necessary to have Powerpoint on the Server to generate it? or  
do i dont need to have Powerpoint to generate it? just for viewing?
is it possible to give that powerpoint a style? because i didnt  
find a real documentation for hslf yet!


so far!

thanks for helping

regards

tom

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Servlet and Excel

2006-01-13 Thread David Fisher

Hi Daniele,

I think I can help. Here is an example using tomcat.

(1) In Tomcat 4.1.31, in your web.xml

   servlet
servlet-namemodelxls/servlet-name
servlet-classcom.pathtoyour.XlsServlet/servlet-class
/servlet

servlet-mapping
servlet-namemodelxls/servlet-name
url-pattern/yourxls.jsp/url-pattern
  /servlet-mapping

The url-pattern doesn't  have to be yourxls.jsp, it could be *.xls or  
xls/*, etc.


(2) Your xls servlet.

public class XlsServlet extends HttpServlet {

public void doGet(HttpServletRequest request,  
HttpServletResponse response) throws ServletException, IOException {


response.setContentType(application/vnd.ms-excel);
response.setHeader(Content-disposition,  
inline;filename=+whatever+.xls);


// output your poi output to response.getOutputStream()\

...

My experience indicates that this is the best Content Type and  
Disposition. You can change inline to attachment if you want to  
try to force the save as dialog. Note that I say try, as user's IE  
settings can get in the way and the only way to fix that is to go to  
the other Explorer - Windows Explorer and change the way that  
the .xls files (application/vnd.ms-excel) are Viewed.


Good luck.

Regards,
Dave

On Jan 13, 2006, at 10:09 AM, Donahue, Michael wrote:

Can you explain what you mean by responding with a jsp page a  
little more.
I have some code that will send back the spreadsheet into an IE  
browser for
display, but it wants the whole screen.  I can also send it as a  
file for

download.

-Original Message-
From: Vaccari, Daniele [mailto:[EMAIL PROTECTED]
Sent: Friday, January 13, 2006 2:28 AM
To: poi-user@jakarta.apache.org
Subject: Servlet and Excel

Hi

I need to find an example on how to produce an Excel file from a  
servlet

and how to send it to the user responding with a jsp page. Does anyone
know where can I find a similar example?

Thank you
Daniele

** 
**

This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
** 
**


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/