poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiv Jivan <sanjiv.ji...@gmail.com>
Subject Re: Maximising an excel file
Date Mon, 28 Mar 2005 22:19:14 GMT
You would need to manually create an excel "template" file and add the
required VBA code using the VBA Macro editor. On your java server,
instead of creating a new workboor using POI, open the existing
template file, add your data programatically and save as a different
file.

POIFSFileSystem fs =
		        new POIFSFileSystem(new FileInputStream("c:/my_templ.xls"));

//you need to pass true for the second argument to preserve marcos
HSSFWorkbook wb = new HSSFWorkbook(fs, true);

...
...

FileOutputStream fileOut = new FileOutputStream("c:/orders.xls");
wb.write(fileOut);
fileOut.close();

Hope this helps,
Sanjiv


On Mon, 28 Mar 2005 13:57:30 -0800 (PST), Pavan Guduru
<pavaneyes_isq@yahoo.com> wrote:
> That can be done in VB. How can we do that thru Java
> 
> Thanks
> Pavan
> --- Sanjiv Jivan <sanjiv.jivan@gmail.com> wrote:
> > In your Workbooks Open subroutine, add the following
> > code :
> >
> > Private Sub Workbook_Open()
> >     Application.WindowState = xlMaximized
> > End Sub
> >
> > Regards,
> > Sanjiv
> >
> > On Mon, 28 Mar 2005 13:40:45 -0800 (PST), Pavan
> > Guduru
> > <pavaneyes_isq@yahoo.com> wrote:
> > > But,
> > > can we make the excel open in a maximised way,
> > thru
> > > java application no matter what its previous
> > settings
> > > are.
> > >
> > > Thanks
> > > Meena
> > > --- Danny Mui <danny@muibros.com> wrote:
> > > > I believe this is an Excel feature.  Open
> > Microsoft
> > > > Excel and collapse
> > > > it to window mode (like 200x400 size), close
> > Excel
> > > > and reopen.  The
> > > > window will remain the same size (200x400).
> > > >
> > > >
> > > >
> > > > Pavan Guduru wrote:
> > > > > Hello All,
> > > > > I am writing out HSSF files on the client end
> > > > through
> > > > > a servlet.
> > > > >
> > > > > The excel sheets that open on the client end
> > are
> > > > not
> > > > > maximised.
> > > > >
> > > > > Is there anyway I can make the excel file open
> > in
> > > > a
> > > > > maximised way
> > > > >
> > > > > Thanks
> > > > > Meena
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Do you Yahoo!?
> > > > > Yahoo! Small Business - Try our new resources
> > > > site!
> > > > > http://smallbusiness.yahoo.com/resources/
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > 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/
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > 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/
> > > >
> > > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Small Business - Try our new resources
> > site!
> > > http://smallbusiness.yahoo.com/resources/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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/
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > 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/
> >
> >
> 
> __________________________________
> Do you Yahoo!?
> Make Yahoo! your home page
> http://www.yahoo.com/r/hs
>

---------------------------------------------------------------------
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