本文整理汇总了Java中jxl.write.WritableSheet.setColumnView方法的典型用法代码示例。如果您正苦于以下问题:Java WritableSheet.setColumnView方法的具体用法?Java WritableSheet.setColumnView怎么用?Java WritableSheet.setColumnView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jxl.write.WritableSheet
的用法示例。
在下文中一共展示了WritableSheet.setColumnView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createIndex
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* Create the index worksheet.
*
* <p>This also creates links back to the index in each of the worksheets.</p>
*/
public void createIndex() {
WritableSheet sheet = workbook.createSheet(spreadsheetifyName("Index"), 0);
createTitle(sheet, "Index");
try {
// Create links for each worksheet, apart from the first sheet which is the
// index we're currently creating
final String[] names = workbook.getSheetNames();
for (int currentSheet = 1; currentSheet < names.length; currentSheet++) {
// Create the link from the index to the table's worksheet
WritableHyperlink link = new WritableHyperlink(0, currentSheet - 1 + NUMBER_OF_ROWS_IN_TITLE, names[currentSheet], workbook.getSheet(currentSheet), 0, 0);
sheet.addHyperlink(link);
//Add the filename in column B (stored in cell B2 of each sheet)
String fileName = workbook.getSheet(currentSheet).getCell(1, 1).getContents();
Label fileNameLabel = new Label(1, currentSheet - 1 + NUMBER_OF_ROWS_IN_TITLE, fileName);
WritableFont fileNameFont = new WritableFont(WritableFont.ARIAL,10,WritableFont.NO_BOLD,false,UnderlineStyle.NO_UNDERLINE,Colour.BLACK);
WritableCellFormat fileNameFormat = new WritableCellFormat(fileNameFont);
fileNameLabel.setCellFormat(fileNameFormat);
sheet.addCell(fileNameLabel);
// Create the link back to the index
link = new WritableHyperlink(0, 1, "Back to index", sheet, 0, currentSheet + NUMBER_OF_ROWS_IN_TITLE - 1);
workbook.getSheet(currentSheet).addHyperlink(link);
//Set column A of each sheet to be wide enough to show "Back to index"
workbook.getSheet(currentSheet).setColumnView(0, 13);
}
// Make Column A fairly wide to show tab names and hide column B
sheet.setColumnView(0, 35);
sheet.setColumnView(1, 0);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
示例2: createExcelSheet
import jxl.write.WritableSheet; //导入方法依赖的package包/类
public void createExcelSheet(WritableSheet excelSheet) {
int row, col;
// Create cells
for (row=0; row<nrows; row++)
for (col=0; col<ncolumns[row]; col++) {
if (sheet[row][col]==null)
continue;
try {
if (sheet[row][col].getMerge_to_col()>=0 && sheet[row][col].getMerge_to_row()>=0)
excelSheet.mergeCells(col, row, sheet[row][col].getMerge_to_col(), sheet[row][col].getMerge_to_row());
switch (sheet[row][col].getType()) {
case LABEL:
excelSheet.addCell(new Label(col,row,sheet[row][col].getString(),getExcelFormat(row, col)));
break;
case FLOAT:
case INTEGER:
excelSheet.addCell(new Number(col,row,sheet[row][col].getNumber(),getExcelFormat(row, col)));
break;
case IMAGE:
File f = new File(sheet[row][col].getString());
WritableImage imgobj=new WritableImage(col, row, sheet[row][col].getWidth(), sheet[row][col].getHeight(), f);
excelSheet.addImage(imgobj);
break;
case VOID:
break;
case FORMULA:
excelSheet.addCell( new Formula(col, row, sheet[row][col].getString(),getExcelFormat(row, col)) );
break;
default:
break;
}
} catch (WriteException we) {};
}
// Resize columns
for (col=0; colSize!=null && col<colSize.length; col++)
if (colSize[col]>0)
excelSheet.setColumnView(col, colSize[col]);
}
示例3: list2Xls
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* 导出list对象到excel
*
* @param config 配置
* @param list 导出的list
* @param outputStream 输出流
* @return 处理结果,true成功,false失败
* @throws Exception
*/
public static boolean list2Xls(ExcelConfig config, List<?> list, OutputStream outputStream) throws Exception {
try {
String[] header = config.getHeaders();
String[] names = config.getNames();
String[] values;
WritableWorkbook wb = Workbook.createWorkbook(outputStream);
String sheetName = (config.getSheet() != null && !config.getSheet().equals("")) ? config.getSheet() : ("sheet" + config.getSheetNum());
WritableSheet sheet = wb.createSheet(sheetName, 0);
int row = 0;
int column = 0;
int rowadd = 0;
//写入标题
if (config.getHeader()) {
for (column = 0; column < header.length; column++) {
sheet.addCell(new Label(column, row + rowadd, header[column]));
if (config.getColumn(column).getWidth() != null) {
sheet.setColumnView(column, config.getColumn(column).getWidth() / 7);
}
}
rowadd++;
}
//写入内容//行
for (row = 0; row < list.size(); row++) {
Object rowData = list.get(row);
values = getObjValues(rowData, names);
//列
for (column = 0; column < values.length; column++) {
sheet.addCell(new Label(column, row + rowadd, values[column]));
}
}
wb.write();
wb.close();
} catch (Exception e1) {
return false;
}
return true;
}
示例4: writeToSheet_1
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* 工作表 1
*
* @param workbook
* @return
*/
protected WritableSheet writeToSheet_1(WritableWorkbook workbook) {
WritableSheet result = null;
try {
result = workbook.createSheet("常數", 1);
result.setColumnView(0, 10);
result.setColumnView(1, 25);
result.setColumnView(2, 10);
//
addHeader(result, 0, 0, "五行類別");
addHeader(result, 1, 0, "值");
addHeader(result, 2, 0, "數字");
//
addString(result, 0, 1, "金");
addString(result, 1, 1, WuxingType.METAL);
addNumber(result, 2, 1, WuxingType.METAL.getValue());
//
addString(result, 0, 2, "木");
addString(result, 1, 2, WuxingType.WOOD);
addNumber(result, 2, 2, WuxingType.WOOD.getValue());
//
addString(result, 0, 3, "土");
addString(result, 1, 3, WuxingType.EARTH);
addNumber(result, 2, 3, WuxingType.EARTH.getValue());
//
addString(result, 0, 4, "水");
addString(result, 1, 4, WuxingType.WATER);
addNumber(result, 2, 4, WuxingType.WATER.getValue());
//
addString(result, 0, 5, "火");
addString(result, 1, 5, WuxingType.FIRE);
addNumber(result, 2, 5, WuxingType.FIRE.getValue());
} catch (Exception ex) {
ex.printStackTrace();
}
//
return result;
}
示例5: writeToSheet_1
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* 工作表 1
*
* @param workbook
* @return
*/
protected WritableSheet writeToSheet_1(WritableWorkbook workbook) {
WritableSheet result = null;
try {
result = workbook.createSheet("常數", 1);
result.setColumnView(0, 10);
result.setColumnView(1, 25);
result.setColumnView(2, 10);
//
addHeader(result, 0, 0, "五行類別");
addHeader(result, 1, 0, "值");
addHeader(result, 2, 0, "數字");
//
addString(result, 0, 1, "金");
addString(result, 1, 1, WuxingType.METAL);
addNumber(result, 2, 1, WuxingType.METAL.getValue());
//
addString(result, 0, 2, "木");
addString(result, 1, 2, WuxingType.WOOD);
addNumber(result, 2, 2, WuxingType.WOOD.getValue());
//
addString(result, 0, 3, "土");
addString(result, 1, 3, WuxingType.EARTH);
addNumber(result, 2, 3, WuxingType.EARTH.getValue());
//
addString(result, 0, 4, "水");
addString(result, 1, 4, WuxingType.WATER);
addNumber(result, 2, 4, WuxingType.WATER.getValue());
//
addString(result, 0, 5, "火");
addString(result, 1, 5, WuxingType.FIRE);
addNumber(result, 2, 5, WuxingType.FIRE.getValue());
} catch (Exception ex) {
throw new EditorException(ex);
}
//
return result;
}
示例6: writeToSheet_3
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* 工作表 3
*
* @param workbook
* @return
*/
protected WritableSheet writeToSheet_3(WritableWorkbook workbook) {
WritableSheet result = null;
try {
ManorCollector collector = CollectorHelper.readFromXml(ManorCollector.class);
//
result = workbook.createSheet("土地", 3);
int dataRow = BEG_DATA_ROW;
int col = 0;
addDef(result, col, 0, "maxEnhanceLevel");
result.setColumnView(col, 15);
addHeader(result, col, BEG_HEADER_ROW, "最高強化等級");
addNumber(result, col, BEG_DATA_ROW, collector.getMaxEnhanceLevel().getValue());
//
col = 1;
addDef(result, col, 0, "safeEnhanceLevel");
result.setColumnView(col, 15);
addHeader(result, col, BEG_HEADER_ROW, "安全強化等級");
addNumber(result, col, BEG_DATA_ROW, collector.getSafeEnhanceLevel().getValue());
//
col = 2;
addDef(result, col, 0, "fantasyEnhanceLevel");
result.setColumnView(col, 15);
addHeader(result, col, BEG_HEADER_ROW, "幻想強化等級");
addNumber(result, col, BEG_DATA_ROW, collector.getFantasyEnhanceLevel().getValue());
} catch (Exception ex) {
throw new EditorException(ex);
}
//
return result;
}
示例7: adjustCellSizes
import jxl.write.WritableSheet; //导入方法依赖的package包/类
private void adjustCellSizes(WritableSheet sheet, int rowIndex, int colIndex) throws RowsExceededException
{
TableColumn<T,?> column = _columns.get(colIndex);
if (column.getColumnType() == ColumnType.IMAGE) {
CellView colCellView = new CellView();
colCellView.setSize(IMAGE_CELL_WIDTH_2IN);
sheet.setColumnView(colIndex, colCellView);
CellView rowCellView = new CellView();
rowCellView.setSize(IMAGE_CELL_HEIGHT_2IN);
sheet.setRowView(rowIndex, rowCellView);
}
}
示例8: buildExcelDocument
import jxl.write.WritableSheet; //导入方法依赖的package包/类
@Override
protected void buildExcelDocument(@SuppressWarnings("rawtypes") Map model, WritableWorkbook workbook,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
response.setContentType("application/vnd.ms-excel");
response.setHeader ("Content-Disposition", "attachment; filename=timesheet.xls");
@SuppressWarnings("unchecked")
Map<Department, List<Assignment>> map =(Map<Department, List<Assignment>>) model.get("data");
WritableSheet sheet = workbook.createSheet("Report->D->A2", 0);
int rowNum = 0;
sheet.setColumnView(0, 50);
sheet.setColumnView(1, 50);
sheet.setColumnView(2, 50);
for(Map.Entry<Department, List<Assignment>> kv : map.entrySet()){
sheet.addCell(new Label(0, rowNum,kv.getKey().getName() ));
sheet.addCell(new Label(1, rowNum,kv.getKey().getOwner().getFullName() ));
rowNum++;
for(Assignment a: kv.getValue()){
sheet.addCell(new Label(1, rowNum,a.getName()));
sheet.addCell(new Label(2, rowNum,a.getOwner().getFullName()));
rowNum++;
}
}
workbook.write();
workbook.close();
}
示例9: buildExcelDocument
import jxl.write.WritableSheet; //导入方法依赖的package包/类
@Override
protected void buildExcelDocument(Map<String, Object> model,
WritableWorkbook workbook, HttpServletRequest request,
HttpServletResponse response) throws Exception {
response.setContentType("application/vnd.ms-excel");
response.setHeader ("Content-Disposition", "attachment; filename=timesheet.xls");
@SuppressWarnings("unchecked")
List<User> users = (List<User>) model.get("Users");
WritableSheet sheet = workbook.createSheet("Assignment->Users Export", 0);
sheet.addCell(new Label(0, 0, "User Name"));
sheet.addCell(new Label(1, 0, "Department"));
int rowNum = 1;
sheet.setColumnView(0, 40);
sheet.setColumnView(1, 40);
for(User u: users){
sheet.addCell(new Label(0, rowNum,u.getFullName().toString()));
sheet.addCell(new Label(1, rowNum,u.getDepartment().getName().toString()));
rowNum++;
}
}
示例10: putDataOnOutputStream
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* 生成excel表格
* @param os
*/
@SuppressWarnings("deprecation")
private void putDataOnOutputStream(OutputStream os,JSONArray dataArray)
{
WritableWorkbook workbook = null;
try
{
workbook = Workbook.createWorkbook(os);
WritableSheet sheet = workbook.createSheet("进销存报表", 0);
//增加列头
int[] colunmWidth = {10,10,10,10,10,10,15,15,15,15,15};
String[] colunmName = {"名称","型号","规格","颜色","单位","单价","上月结存数量","入库数量","出库数量","本月结存数量","结存金额"};
for(int i = 0 ;i < colunmWidth.length;i ++)
{
sheet.setColumnView(i,colunmWidth[i]);
sheet.addCell(new Label(i, 0, colunmName[i]));
}
if (null != dataArray &&dataArray.size() > 0)
{
for(int j=0; j < dataArray.size(); j++){
JSONObject jo = JSONObject.fromObject(dataArray.get(j));
sheet.addCell(new Label(0, j+1, jo.getString("MaterialName")));
sheet.addCell(new Label(1, j+1, jo.getString("MaterialModel")));
sheet.addCell(new Label(2, j+1, jo.getString("MaterialStandard")));
sheet.addCell(new Label(3, j+1, jo.getString("MaterialColor")));
sheet.addCell(new Label(4, j+1, jo.getString("MaterialUnit")));
sheet.addCell(new Label(5, j+1, jo.getString("UnitPrice")));
sheet.addCell(new Label(6, j+1, jo.getString("prevSum")));
sheet.addCell(new Label(7, j+1, jo.getString("InSum")));
sheet.addCell(new Label(8, j+1, jo.getString("OutSum")));
sheet.addCell(new Label(9, j+1, jo.getString("thisSum")));
double d = Double.parseDouble(jo.getString("thisAllPrice").toString());
String s1 = String.format("%.2f", d);
sheet.addCell(new Label(10, j+1, s1));
}
}
workbook.write();
workbook.close();
}
catch (Exception e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>>>>>导出资产信息为excel表格异常", e);
}
}
示例11: autoSizeColumn
import jxl.write.WritableSheet; //导入方法依赖的package包/类
private void autoSizeColumn(int column, WritableSheet sheet) {
CellView cell = sheet.getColumnView(column);
cell.setAutosize(true);
sheet.setColumnView(column, cell);
}
示例12: putDataOnOutputStream
import jxl.write.WritableSheet; //导入方法依赖的package包/类
/**
* 生成excel表格
* @param os
*/
@SuppressWarnings("deprecation")
private void putDataOnOutputStream(OutputStream os,JSONArray dataArray)
{
WritableWorkbook workbook = null;
try
{
workbook = Workbook.createWorkbook(os);
WritableSheet sheet = workbook.createSheet("进销存报表", 0);
//增加列头
int[] colunmWidth = {10,10,10,10,15,15,15,15,15};
String[] colunmName = {"名称","款号","颜色","单价","上月结存数量","入库数量","出库数量","本月结存数量","结存金额"};
for(int i = 0 ;i < colunmWidth.length;i ++)
{
sheet.setColumnView(i,colunmWidth[i]);
sheet.addCell(new Label(i, 0, colunmName[i]));
}
if (null != dataArray &&dataArray.size() > 0)
{
for(int j=0; j < dataArray.size(); j++){
JSONObject jo = JSONObject.fromObject(dataArray.get(j));
sheet.addCell(new Label(0, j+1, jo.getString("MaterialName")));
sheet.addCell(new Label(1, j+1, jo.getString("MaterialModel")));
sheet.addCell(new Label(2, j+1, jo.getString("MaterialColor")));
sheet.addCell(new Label(3, j+1, jo.getString("UnitPrice")));
sheet.addCell(new Label(4, j+1, jo.getString("prevSum")));
sheet.addCell(new Label(5, j+1, jo.getString("InSum")));
sheet.addCell(new Label(6, j+1, jo.getString("OutSum")));
sheet.addCell(new Label(7, j+1, jo.getString("thisSum")));
double d = Double.parseDouble(jo.getString("thisAllPrice").toString());
String s1 = String.format("%.2f", d);
sheet.addCell(new Label(8, j+1, s1));
}
}
workbook.write();
workbook.close();
}
catch (Exception e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>>>>>导出资产信息为excel表格异常", e);
}
}
示例13: createSystemSlotSheet
import jxl.write.WritableSheet; //导入方法依赖的package包/类
private void createSystemSlotSheet(WritableSheet sheet) throws RowsExceededException, WriteException {
GenericData slot[];
int row;
int i,j;
String s[];
int lparNameSize=0;
int descriptionSize=0;
int locationSize=0;
row = 0;
for (i=0; i<managedSystem.length; i++) {
/*
* Show start of system
*/
s = managedSystem[i].getVarValues("name");
sheet.mergeCells(0, row, 3, row+1);
addLabel(sheet,0,row,s[0],formatLabel(BOLD|CENTRE|VCENTRE|GREEN));
row++;
row++;
/*
* Setup titles
*/
addLabel(sheet,0,row,"LPAR",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,"Adapter description",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,2,row,"Location",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,3,row,"drc_index",formatLabel(CENTRE|BOLD|B_ALL_MED));
row ++;
/*
* Write variables
*/
slot = managedSystem[i].getObjects(SLOT);
if (slot==null) {
row +=2;
continue;
}
for (j=0; j<slot.length; j++) {
s = slot[j].getVarValues("lpar_name");
if (s!=null) {
addLabel(sheet, 0, row, s, 0, formatLabel(B_LEFT_LOW|B_BOTTOM_LOW|B_RIGHT_LOW));
if (s[0].length()>lparNameSize)
lparNameSize=s[0].length();
} else
addLabel(sheet, 0, row, null, 0, formatLabel(B_LEFT_LOW|B_BOTTOM_LOW|B_RIGHT_LOW));
s = slot[j].getVarValues("description");
addLabel(sheet, 1, row, s, 0, formatLabel(B_LEFT_LOW|B_BOTTOM_LOW|B_RIGHT_LOW));
if (s[0].length()>descriptionSize)
descriptionSize=s[0].length();
s = slot[j].getVarValues("drc_name");
addLabel(sheet, 2, row, s, 0, formatLabel(B_LEFT_LOW|B_BOTTOM_LOW|B_RIGHT_LOW));
if (s[0].length()>locationSize)
locationSize=s[0].length();
s = slot[j].getVarValues("drc_index");
addLabel(sheet, 3, row, s, 0, formatLabel(CENTRE|B_LEFT_LOW|B_BOTTOM_LOW|B_RIGHT_LOW));
row++;
}
row +=2;
}
if (lparNameSize < 10)
lparNameSize=8;
sheet.setColumnView(0, lparNameSize+2);
sheet.setColumnView(1, descriptionSize+2);
sheet.setColumnView(2, locationSize+2);
sheet.setColumnView(3, 10);
}
示例14: createHeader
import jxl.write.WritableSheet; //导入方法依赖的package包/类
private void createHeader(WritableSheet sheet) throws RowsExceededException, WriteException {
int row;
row = 0;
addLabel(sheet,0,row,"Manager Name",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,scannerParams.getVarValues("HMC")[0],formatLabel(B_ALL_LOW));
row++;
addLabel(sheet,0,row,"Manager Type",formatLabel(BOLD|B_ALL_MED));
switch (managerType) {
case M_FSM: addLabel(sheet,1,row,"FSM",formatLabel(B_ALL_LOW)); break;
case M_HMC: addLabel(sheet,1,row,"HMC",formatLabel(B_ALL_LOW)); break;
case M_SDMC: addLabel(sheet,1,row,"SDMC",formatLabel(B_ALL_LOW)); break;
case M_IVM: addLabel(sheet,1,row,"IVM",formatLabel(B_ALL_LOW)); break;
default: break;
}
row++;
addLabel(sheet,0,row,"User",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,scannerParams.getVarValues("user")[0],formatLabel(B_ALL_LOW));
row++;
addLabel(sheet,0,row,"Generation Date",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,scannerParams.getVarValues("date")[0],formatLabel(B_ALL_LOW));
row++;
addLabel(sheet,0,row,"Generation Time",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,scannerParams.getVarValues("time")[0],formatLabel(B_ALL_LOW));
row++;
addLabel(sheet,0,row,"Manager Date",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,scannerParams.getVarValues("HMCdate")[0],formatLabel(B_ALL_LOW));
row++;
addLabel(sheet,0,row,"Manager Time",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,scannerParams.getVarValues("HMCtime")[0],formatLabel(B_ALL_LOW));
row++;
addLabel(sheet,0,row,"HMC Scanner Version",formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,1,row,version,formatLabel(B_ALL_LOW));
row++;
row++;
addLabel(sheet,0,row,"Latest HMC Scanner is available at http://tinyurl.com/HMCscanner",formatLabel(NONE));
row++;
addLabel(sheet,0,row,"For issues send a mail to [email protected]",formatLabel(NONE));
row++;
File f = new File(System.getProperty("user.dir")+File.separatorChar+hmcScannerPic);
if (f.exists()) {
WritableImage imgobj=new WritableImage(3, 2, 5, 15, f);
sheet.addImage(imgobj);
}
sheet.setColumnView(0, 21);
sheet.setColumnView(1, 36);
}
示例15: createSysRAMUsageSheet
import jxl.write.WritableSheet; //导入方法依赖的package包/类
private void createSysRAMUsageSheet(WritableSheet sheet) throws RowsExceededException, WriteException {
int i,j;
String s;
float f,f2;
int size=0;
int row;
String timeLabels[] = msMemConfig[0].getMonthlyLabels();
row = 0;
sheet.mergeCells(0, row, 13, row);
addLabel(sheet,0,row,"Average Free Memory GB",formatLabel(BOLD|CENTRE|VCENTRE|GREEN));
sheet.mergeCells(15, row, 28, row);
addLabel(sheet,15,row,"Average Percentage Free Memory",formatLabel(BOLD|CENTRE|VCENTRE|GREEN));
row++;
for (i=0; i<timeLabels.length; i++) {
s = timeLabels[i];
addLabel(sheet,1+i,row,s,formatLabel(BOLD|B_ALL_MED));
addLabel(sheet,16+i,row,s,formatLabel(BOLD|B_ALL_MED));
}
row++;
for (i=0; i<managedSystem.length; i++) {
s = managedSystem[i].getVarValues("name")[0];
if (s.length()>size)
size=s.length();
addLabel(sheet,0,row+i,s,formatLabel(BOLD|VCENTRE|CENTRE|B_ALL_MED));
addLabel(sheet,15,row+i,s,formatLabel(BOLD|VCENTRE|CENTRE|B_ALL_MED));
for (j=0; j<timeLabels.length; j++) {
f = msMemAvail[i].getMonthData(j);
f2 = msMemConfig [i].getMonthData(j);
if (f>=0)
addNumber(sheet,1+j,row+i, f, formatFloat(B_RIGHT_LOW|B_LEFT_LOW|B_BOTTOM_LOW));
if (f>=0 && f2>0)
addNumber(sheet,16+j,row+i, f/f2*100, formatFloat(B_RIGHT_LOW|B_LEFT_LOW|B_BOTTOM_LOW));
}
}
row+=i;
row++;
sheet.mergeCells(0, row, 13, row);
addLabel(sheet,0,row,"Average Configured Memory GB",formatLabel(BOLD|CENTRE|VCENTRE|GREEN));
row++;
for (i=0; i<timeLabels.length; i++) {
s = timeLabels[i];
addLabel(sheet,1+i,row,s,formatLabel(BOLD|B_ALL_MED));
}
row++;
for (i=0; i<managedSystem.length; i++) {
s = managedSystem[i].getVarValues("name")[0];
if (s.length()>size)
size=s.length();
addLabel(sheet,0,row+i,s,formatLabel(BOLD|VCENTRE|CENTRE|B_ALL_MED));
for (j=0; j<timeLabels.length; j++) {
f = msMemConfig [i].getMonthData(j);
if (f>=0)
addNumber(sheet,1+j,row+i, f, formatFloat(B_RIGHT_LOW|B_LEFT_LOW|B_BOTTOM_LOW));
}
}
row+=i;
row++;
sheet.setColumnView(0, size+6);
sheet.setColumnView(15, size+6);
}