You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Moody Lee <mm...@gmail.com> on 2008/03/27 11:59:21 UTC

how to make the gridline disappeared by API

Hi,

I'm working with POI 3.0.2-FINAL, using it to generate some report.
Does anyone know how to perform the following action by API like I'm
operating the Excel file?
menu->tool->options->
in the "view" tab
uncheck the "gridline" checkbox.

which I want to do is let the gridlines disappear.

any idea is appreciated.

thanks you.

Moody.

Re: how to make the gridline disappeared by API

Posted by Moody Lee <mm...@gmail.com>.
Thanks for your reply, Sumit.

I'll take the approach to set the cell style for each cell then.


2008/3/27, Sumit Jain <Su...@lntinfotech.com>:
>
> There as per version 3.0.1-final, there is no way u can do that...
>
>
> Thanks & Regards
> Sumit Jain
> L&T Infotech, Powai
> Mobile: +91-9920911884
> Ext: 6052
> Email: sumit.jain@Lntinfotech.com
>
> Larsen & Toubro Infotech Ltd.
> www.Lntinfotech.com
>
>
>
>
>
>             "Moody Lee"
>             <mmoody.lee@gmail
>             .com>                                                      To
>                                       "POI User List"
>             03/27/2008 05:01          <us...@poi.apache.org>
>             PM                                                         cc
>
>                                                                   Subject
>             Please respond to         Re: how to make the gridline
>             "POI Users List"          disappeared by API
>             <user@poi.apache.
>                   org>
>
>
>
>
>
>
>
>
> Hi,
>
> I've discovered one approach by the following code:
>
> cellStyle.setFillForegroundColor(HSSFColor.WHITE.index);
> cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
> cell.setCellStyle(cellStyle);
>
> but is there any method to modify the property of the workbook?
> so i needn't to set the cell style for each cell.
>
> Thanks.
>
>
> 2008/3/27, Moody Lee <mm...@gmail.com>:
> >
> > Hi,
> >
> > I'm working with POI 3.0.2-FINAL, using it to generate some report.
> > Does anyone know how to perform the following action by API like I'm
> > operating the Excel file?
> > menu->tool->options->
> > in the "view" tab
> > uncheck the "gridline" checkbox.
> >
> > which I want to do is let the gridlines disappear.
> >
> > any idea is appreciated.
> >
> > thanks you.
> >
> > Moody.
> >
> >
>
>
> ______________________________________________________________________
>
>
> ______________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: how to make the gridline disappeared by API

Posted by Sumit Jain <Su...@lntinfotech.com>.
There as per version 3.0.1-final, there is no way u can do that...


Thanks & Regards
Sumit Jain
L&T Infotech, Powai
Mobile: +91-9920911884
Ext: 6052
Email: sumit.jain@Lntinfotech.com

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com




                                                                           
             "Moody Lee"                                                   
             <mmoody.lee@gmail                                             
             .com>                                                      To 
                                       "POI User List"                     
             03/27/2008 05:01          <us...@poi.apache.org>               
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: how to make the gridline        
             "POI Users List"          disappeared by API                  
             <user@poi.apache.                                             
                   org>                                                    
                                                                           
                                                                           
                                                                           
                                                                           




Hi,

I've discovered one approach by the following code:

cellStyle.setFillForegroundColor(HSSFColor.WHITE.index);
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
cell.setCellStyle(cellStyle);

but is there any method to modify the property of the workbook?
so i needn't to set the cell style for each cell.

Thanks.


2008/3/27, Moody Lee <mm...@gmail.com>:
>
> Hi,
>
> I'm working with POI 3.0.2-FINAL, using it to generate some report.
> Does anyone know how to perform the following action by API like I'm
> operating the Excel file?
> menu->tool->options->
> in the "view" tab
> uncheck the "gridline" checkbox.
>
> which I want to do is let the gridlines disappear.
>
> any idea is appreciated.
>
> thanks you.
>
> Moody.
>
>


______________________________________________________________________


______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: how to make the gridline disappeared by API

Posted by Moody Lee <mm...@gmail.com>.
Hi,

I've discovered one approach by the following code:

cellStyle.setFillForegroundColor(HSSFColor.WHITE.index);
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
cell.setCellStyle(cellStyle);

but is there any method to modify the property of the workbook?
so i needn't to set the cell style for each cell.

Thanks.


2008/3/27, Moody Lee <mm...@gmail.com>:
>
> Hi,
>
> I'm working with POI 3.0.2-FINAL, using it to generate some report.
> Does anyone know how to perform the following action by API like I'm
> operating the Excel file?
> menu->tool->options->
> in the "view" tab
> uncheck the "gridline" checkbox.
>
> which I want to do is let the gridlines disappear.
>
> any idea is appreciated.
>
> thanks you.
>
> Moody.
>
>

Re: how to make the gridline disappeared by API

Posted by Moody Lee <mm...@gmail.com>.
Thanks a lot ook. That's what I want!

2008/3/28, ook? ook! <oo...@gmail.com>:
>
> Hi there. Maybe I don't understand your need, but don't it'd be easier and
> lighter to use HSSFSheet.setDisplayGridlines(false)?
>
> http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFSheet.html#setDisplayGridlines(boolean)
>
> HTH.
>
> 2008/3/28, Moody Lee <mm...@gmail.com>:
> >
> > Thanks Nick.
> >
> > I've not found any API to do so till now.
> > And I've compared the two excel files using hssf.dev.BiffViewer.
> >
> > The following description differs in the result.
> > =================================================
> > Offset 0x24fd (9469)
> > recordid = 0x23e, size = 18
> > [WINDOW2]
> >     .options        = 6b6
> >        .dispformulas= false
> >        .dispgridlins= true
> >        .disprcheadin= true
> >        .freezepanes = false
> >        .displayzeros= true
> >        .defaultheadr= true
> >        .arabic      = false
> >        .displayguts = true
> >        .frzpnsnosplt= false
> >        .selected    = true
> >        .paged       = true
> >        .svdinpgbrkpv= false
> >     .toprow         = 0
> >     .leftcol        = 0
> >     .headercolor    = 40
> >     .pagebreakzoom  = 0
> >     .normalzoom     = 0
> >     .reserved       = 0
> > [/WINDOW2]
> > =================================================
> > This is the descriptions of the file with gridlines displayed.
> > The "disgridline" property is set to "false" when the gridlines not
> > displayed.
> >
> > Hope this useful...
> >
> > Best Regards,
> > Moody
> >
> > 2008/3/27, Nick Burch <ni...@torchbox.com>:
> >
> > >
> > > On Thu, 27 Mar 2008, Moody Lee wrote:
> > > > I'm working with POI 3.0.2-FINAL, using it to generate some report.
> > > > Does anyone know how to perform the following action by API like I'm
> > > > operating the Excel file?
> > >
> > >
> > > I'm not aware of anything, so if you've searched and couldn't find the
> > > answer, it might not currently be possible
> > >
> > > What you'll probably want to do is create a very simple excel file,
> > > without grid lines. Save that, then turn on grid lines, and save to
> > > another file. Use the various dev tools (poifs.dev.POIFSViewer and
> > > hssf.dev.BiffViewer) to spot what excel changed between the two files.
> > >
> > > Once you know that, it should hopefully be fairly easy to support it
> > > nicely in poi. Until we know what records get changed / added /
> removed,
> > > supporting it isn't really possible
> > >
> > >
> > > Nick
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > > For additional commands, e-mail: user-help@poi.apache.org
> > >
> > >
> >
>

Re: how to make the gridline disappeared by API

Posted by Moody Lee <mm...@gmail.com>.
Thanks a lot ook. That's what I want!

2008/3/28, ook? ook! <oo...@gmail.com>:
>
> Hi there. Maybe I don't understand your need, but don't it'd be easier and
> lighter to use HSSFSheet.setDisplayGridlines(false)?
>
> http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFSheet.html#setDisplayGridlines(boolean)
>
> HTH.
>
> 2008/3/28, Moody Lee <mm...@gmail.com>:
> >
> > Thanks Nick.
> >
> > I've not found any API to do so till now.
> > And I've compared the two excel files using hssf.dev.BiffViewer.
> >
> > The following description differs in the result.
> > =================================================
> > Offset 0x24fd (9469)
> > recordid = 0x23e, size = 18
> > [WINDOW2]
> >     .options        = 6b6
> >        .dispformulas= false
> >        .dispgridlins= true
> >        .disprcheadin= true
> >        .freezepanes = false
> >        .displayzeros= true
> >        .defaultheadr= true
> >        .arabic      = false
> >        .displayguts = true
> >        .frzpnsnosplt= false
> >        .selected    = true
> >        .paged       = true
> >        .svdinpgbrkpv= false
> >     .toprow         = 0
> >     .leftcol        = 0
> >     .headercolor    = 40
> >     .pagebreakzoom  = 0
> >     .normalzoom     = 0
> >     .reserved       = 0
> > [/WINDOW2]
> > =================================================
> > This is the descriptions of the file with gridlines displayed.
> > The "disgridline" property is set to "false" when the gridlines not
> > displayed.
> >
> > Hope this useful...
> >
> > Best Regards,
> > Moody
> >
> > 2008/3/27, Nick Burch <ni...@torchbox.com>:
> >
> > >
> > > On Thu, 27 Mar 2008, Moody Lee wrote:
> > > > I'm working with POI 3.0.2-FINAL, using it to generate some report.
> > > > Does anyone know how to perform the following action by API like I'm
> > > > operating the Excel file?
> > >
> > >
> > > I'm not aware of anything, so if you've searched and couldn't find the
> > > answer, it might not currently be possible
> > >
> > > What you'll probably want to do is create a very simple excel file,
> > > without grid lines. Save that, then turn on grid lines, and save to
> > > another file. Use the various dev tools (poifs.dev.POIFSViewer and
> > > hssf.dev.BiffViewer) to spot what excel changed between the two files.
> > >
> > > Once you know that, it should hopefully be fairly easy to support it
> > > nicely in poi. Until we know what records get changed / added /
> removed,
> > > supporting it isn't really possible
> > >
> > >
> > > Nick
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > > For additional commands, e-mail: user-help@poi.apache.org
> > >
> > >
> >
>

Re: how to make the gridline disappeared by API

Posted by ook? ook! <oo...@gmail.com>.
Hi there. Maybe I don't understand your need, but don't it'd be easier and
lighter to use HSSFSheet.setDisplayGridlines(false)?
http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFSheet.html#setDisplayGridlines(boolean)

HTH.

2008/3/28, Moody Lee <mm...@gmail.com>:
>
> Thanks Nick.
>
> I've not found any API to do so till now.
> And I've compared the two excel files using hssf.dev.BiffViewer.
>
> The following description differs in the result.
> =================================================
> Offset 0x24fd (9469)
> recordid = 0x23e, size = 18
> [WINDOW2]
>     .options        = 6b6
>        .dispformulas= false
>        .dispgridlins= true
>        .disprcheadin= true
>        .freezepanes = false
>        .displayzeros= true
>        .defaultheadr= true
>        .arabic      = false
>        .displayguts = true
>        .frzpnsnosplt= false
>        .selected    = true
>        .paged       = true
>        .svdinpgbrkpv= false
>     .toprow         = 0
>     .leftcol        = 0
>     .headercolor    = 40
>     .pagebreakzoom  = 0
>     .normalzoom     = 0
>     .reserved       = 0
> [/WINDOW2]
> =================================================
> This is the descriptions of the file with gridlines displayed.
> The "disgridline" property is set to "false" when the gridlines not
> displayed.
>
> Hope this useful...
>
> Best Regards,
> Moody
>
> 2008/3/27, Nick Burch <ni...@torchbox.com>:
>
> >
> > On Thu, 27 Mar 2008, Moody Lee wrote:
> > > I'm working with POI 3.0.2-FINAL, using it to generate some report.
> > > Does anyone know how to perform the following action by API like I'm
> > > operating the Excel file?
> >
> >
> > I'm not aware of anything, so if you've searched and couldn't find the
> > answer, it might not currently be possible
> >
> > What you'll probably want to do is create a very simple excel file,
> > without grid lines. Save that, then turn on grid lines, and save to
> > another file. Use the various dev tools (poifs.dev.POIFSViewer and
> > hssf.dev.BiffViewer) to spot what excel changed between the two files.
> >
> > Once you know that, it should hopefully be fairly easy to support it
> > nicely in poi. Until we know what records get changed / added / removed,
> > supporting it isn't really possible
> >
> >
> > Nick
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > For additional commands, e-mail: user-help@poi.apache.org
> >
> >
>

Re: how to make the gridline disappeared by API

Posted by Moody Lee <mm...@gmail.com>.
Thanks Nick.

I've not found any API to do so till now.
And I've compared the two excel files using hssf.dev.BiffViewer.

The following description differs in the result.
=================================================
Offset 0x24fd (9469)
recordid = 0x23e, size = 18
[WINDOW2]
    .options        = 6b6
       .dispformulas= false
       .dispgridlins= true
       .disprcheadin= true
       .freezepanes = false
       .displayzeros= true
       .defaultheadr= true
       .arabic      = false
       .displayguts = true
       .frzpnsnosplt= false
       .selected    = true
       .paged       = true
       .svdinpgbrkpv= false
    .toprow         = 0
    .leftcol        = 0
    .headercolor    = 40
    .pagebreakzoom  = 0
    .normalzoom     = 0
    .reserved       = 0
[/WINDOW2]
=================================================
This is the descriptions of the file with gridlines displayed.
The "disgridline" property is set to "false" when the gridlines not
displayed.

Hope this useful...

Best Regards,
Moody

2008/3/27, Nick Burch <ni...@torchbox.com>:
>
> On Thu, 27 Mar 2008, Moody Lee wrote:
> > I'm working with POI 3.0.2-FINAL, using it to generate some report.
> > Does anyone know how to perform the following action by API like I'm
> > operating the Excel file?
>
>
> I'm not aware of anything, so if you've searched and couldn't find the
> answer, it might not currently be possible
>
> What you'll probably want to do is create a very simple excel file,
> without grid lines. Save that, then turn on grid lines, and save to
> another file. Use the various dev tools (poifs.dev.POIFSViewer and
> hssf.dev.BiffViewer) to spot what excel changed between the two files.
>
> Once you know that, it should hopefully be fairly easy to support it
> nicely in poi. Until we know what records get changed / added / removed,
> supporting it isn't really possible
>
>
> Nick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: how to make the gridline disappeared by API

Posted by Nick Burch <ni...@torchbox.com>.
On Thu, 27 Mar 2008, Moody Lee wrote:
> I'm working with POI 3.0.2-FINAL, using it to generate some report.
> Does anyone know how to perform the following action by API like I'm
> operating the Excel file?

I'm not aware of anything, so if you've searched and couldn't find the 
answer, it might not currently be possible

What you'll probably want to do is create a very simple excel file, 
without grid lines. Save that, then turn on grid lines, and save to 
another file. Use the various dev tools (poifs.dev.POIFSViewer and 
hssf.dev.BiffViewer) to spot what excel changed between the two files.

Once you know that, it should hopefully be fairly easy to support it 
nicely in poi. Until we know what records get changed / added / removed, 
supporting it isn't really possible

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org