Library:JExcelAPI 2.6  
Package
jxl.biff.formula
Overview
Members
Books
SinceNot specified.
VersionNot specified.
AuthorNot specified.
No description provided.
Wiki javadoc Use textile entry format.

WorkbookSettings ws = new WorkbookSettings();
ws.setLocale(Locale.GERMAN);

WritableWorkbook workbook = Workbook.createWorkbook(response.getOutputStream(),ws);
WritableSheet tableSheet = workbook.createSheet(table_name, 0);

Formula formel = new Formula(0,6,"SUM(A1:A4)");

//*****************///
//Another Example:
String filename = “Notenberechnung.xls“;
response.setContentType (“application/octet-stream“);
response.setHeader(“Content-Disposition“, “attachment;filename=“+ filename);

WritableWorkbook workbook
= Workbook.createWorkbook(response.getOutputStream ());

WritableSheet sheet = workbook.createSheet(“Notenberechnung“, 0);

//Fill CELL C8 and D8 with Data
//...
//Multiply C8 with D8

Formula formel = new Formula(4,7,“C8*D8“);
sheet.addCell(formel);

//*****////

// To format the formular cell, just add format information:
WritableCellFormat arial12format2
= new WritableCellFormat (arial12font2);
WritableCellFormat arial12format2WithoutColor
= new WritableCellFormat (arial12font2);
Formula formel = new Formula(4,7,“C8*D8”,arial12format2WithoutColor);