You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2003/05/05 11:16:03 UTC

DO NOT REPLY [Bug 19642] New: - how to hide gridlines on an excel sheet

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19642>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19642

how to hide gridlines on an excel sheet

           Summary: how to hide gridlines on an excel sheet
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: Arshi.Singh@geind.ge.com


Hi,
    I have been using the     apache.poi.hssf package for my project. I have
made an excel sheet using HSSFSheet class in org.apache.poi.hssf.usermodel
package. This class has 2 member functions for setting properties of
gridlines on the sheet.
    void setGridsPrinted(boolean value) 
    void setPrintGridlines(boolean newPrintGridlines)
I tried to hide the gridlines using both these functions but they are not
working. Where am i going wrong?  The exact code is given below.
 
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.*;
 
static HSSFWorkbook wb;
static HSSFSheet sheet;
static HSSFRow sheet_row;
.....
{ ....
FileReader fr= new FileReader("Daily1.txt");
 BufferedReader br = new BufferedReader(fr);
 String sheetName="Daily";
 String fileName ="out.xls";
 FileOutputStream fileOut = new FileOutputStream(fileName);
 
 wb = new HSSFWorkbook();
 sheet = wb.createSheet(sheetName);
 sheet.setGridsPrinted(false);
 sheet.setPrintGridlines(false);
....
....
wb.write(fileOut);
 fileOut.close();
 fr.close();
 
Kindly help me find the problem.