poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Madhav Sadhu" <madhav.sa...@saama.com>
Subject Re: Problem with Cell formatting at columns level
Date Tue, 17 Jan 2006 20:46:17 GMT
Thanks Anthony,

If you have the class which you mentioned please pass it to me. It will be
of great help.

Thanks
Madhav

----- Original Message -----
From: "Anthony Andrews" <pythonaddict@yahoo.com>
To: "POI Users List" <poi-user@jakarta.apache.org>
Sent: Tuesday, January 17, 2006 12:31 PM
Subject: Re: Problem with Cell formatting at columns level


> Sorry to say that I do not, no.
>
>   I also use JExcel and it works in the same way, you apply the formatting
to the cell and not the column.
>
>   The only other option I could think of is OLE. It is NOT for the
fainthearted, in fact Microsoft advise against using it to 'drive'  Excel.
Their argument is that Excel relies on interacting with the user  to resolve
problems and OLE does not support this, that there are  problems with
multi-threaded access to the application and so on.  However, if you are
prepared for the work then there is a possible  course of action open to
you.
>
>   When IBM wrote the Eclipse platform originally, they included the SWT
or Standard Widget Toolkit. One of the packages built into the SWT is  an
OLE package that does allow you to take full control over Excel. If  you
have ever written an Excel macro - using VBA - you will know just  what I am
talking about. A long time ago, I wrote a very simple class  that
demonstrated how to use the OLE package but it is not, I must  emphasise, a
trivial task. What you are actually doing is executing VBA  commands. Just
to give you some idea, this is VBA -  Columns("A:A").Select - it is the
command that selects all of the cells  in column A. To automate this using
OLE you would obtain what is called  an OLEAutomation object that refers to
the worksheet, use this to  obtain another OLEAutomation object for the
Columns entity and then use  this to execute the select command. It can be
quite labour intensive as  you need to work your way through the Excel
Object Model to find just  the
>  property/method you need.
>
>   If you wish, I will try to look out that class and let you have it but
I can offer no guarantees. You will also need to obtain the archive for  the
SWT and ensure that this is included on your classpath but that is  easy
enough to do. Of course, if you use Eclipse as your development
environment, then you have most of the tools you need.
>
>
>
> Madhav Sadhu <madhav.sadhu@saama.com> wrote:  Hi Anthony,
>
> Thanks for the quick reply.
>
> I tried this approach before and it works, but the issue is, I need to
serve
> this xls over the web to the client browser.
> This will increase the download time and network traffic if I create a
huge
> XLS file with blank rows and send it across the web.
> User might end up using 10 rows, whereas I have to send a file with
> 65000(this is the maximun number that is alowed in xls I guess) rows.
>
> Are you aware of any licensed tools which will allow to set formatting at
> Column level (No JNI wrappers over COM components since my environment is
> linux) ?
>
> Thanks
> Madhav
>
>
> ----- Original Message -----
> From: "Anthony Andrews"
>
> To: "POI Users List"
>
> Sent: Tuesday, January 17, 2006 12:02 PM
> Subject: Re: Problem with Cell formatting at columns level
>
>
> > As far as I am aware, there is no way to apply a  format to a column -
> that is too all of the cells in a column - using a  single command. What
you
> will have to do is add blank cells to the  column in question; perhaps
> surprisingly, it is possible to set the  format for Blank cells. That
should
> ensure that the format of the cells  in the column is set ready for your
> users to enter data.
> >
> >   I have to admit however, that I have not tried this myself but I
believe
> it will work.
> >
> > Madhav Sadhu  wrote:  Hello,
> >
> > I need to format the entire column of an excel. Currently, the only way
I
> > can do it is by assigning a format to all the cells. However, for my
> > requirement, I  need to create a blank excel sheet with the columns
> > formatted, so that when users use that excel to fill in data, they donot
> do
> > need to worry about putting the data in a proper format.
> >
> > I had posted this in the bug list and sent an email also on the same but
> > could not get any help. Any help in this matter is greatley appreciated.
> >
> > Thanks
> > Madhav
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> > The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> >
> >
> >
> >
> >
> > ---------------------------------
> > Yahoo! Photos
> >  Got holiday prints? See all the ways to get quality prints in your
hands
> ASAP.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>
>
>
>
>
>
> ---------------------------------
> Yahoo! Photos - Showcase holiday pictures in hardcover
>  Photo Books. You design it and we'll bind it!


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


Mime
View raw message