When I put the new jars for version 1.0.8 in they compiled and I have access
to the getHeader() method now, but I don't see any header when I open up the
spreadsheet? I just did a cut n paste with your code and don't have anything
else in the code to try and isolate the problem. All I added in was the file
io stuff and a simple try/catch block.
i.e.
try
{
// Write the output to a file
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
//Write the data to the file object.
wb.write(fileOut);
// Close out the file object.
fileOut.close();
}
catch (Exception e)
{
System.err.println(e.toString());
return;
}
}
and there aren't any errors. I don't feel real bright right now.
James
-----Original Message-----
From: Laubach Shawn Contr OC-ALC/PSB
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 9:02 AM
To: 'POI Users List'
Subject: RE: Header/Footer question
Headers and footers were not added until 1.8.
Shawn
-----Original Message-----
From: DRINKARD, JAMES E (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 8:52 AM
To: 'POI Users List'
Subject: RE: Header/Footer question
Importance: High
My sheet object doesn't have the getHeader() method. I must be missing a jar
file? I'm using: commons-logging-1_0_2.jar,
jakarta-poi-1.5.0-FINAL-20020506.jar and
jakarta-poi-examples-1.5.0-FINAL-20020506.jar only or am I doing something
else wrong?
-----Original Message-----
From: Laubach Shawn Contr OC-ALC/PSB
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 8:27 AM
To: 'POI Users List'
Subject: RE: Header/Footer question
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
HSSFHeader header = sheet.getHeader();
header.setCenter("Center Header");
header.setLeft("Left Header");
header.setRight(HSSFHeader.font("Stencil-Normal", "Italic") +
HSSFHeader.fontSize((short) 16) + "Right w/ Stencil-Normal
Italic font and size 16");
Shawn
-----Original Message-----
From: DRINKARD, JAMES E (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 7:40 AM
To: '[EMAIL PROTECTED]'
Subject: Header/Footer question
Importance: High
Hello All,
How do I set a simple header/footer with hssf? I reviewed the api and docs,
but don't see any valid examples. I have been able to create a workbook,
sheet, rows and cells without any problems.
James
James Drinkard
SBC Online
1010 Pine St. 10-W-37
St. Louis, MO 63101
Work: (314) 331-2860
Pager: (877) 717-0418
Text Pager: http://www.arch.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]