-
problems with Jxl
Hi all,
I am creating an application in which i want to read the data from an excel sheet and do some processing on it and than I want to change the colour of those rows that have more than one null values..... I am using jxl package for this... A simple application I have created that tends to read the sheet and change the colour of rows....
But it is not working....
Code:
public class Parser
{
public static void main(String args[]) throws FileNotFoundException,ClassNotFoundException,IOException,jxl.read.biff.BiffException,WriteException
{
Workbook workbook =Workbook.getWorkbook(newFile("MySheet.xls"));
Sheet sheet = workbook.getSheet(0);
CellView rowView = sheet.getRowView(rowNumber);
WritableCellFormat newFormat = new WritableCellFormat(rowView.getFormat());
newFormat.setBackground(Colour.RED);
rowView.setFormat(newFormat);
}
}
Please help..... Thanks in advance
Regards
Harpreet1111
-
I am getting the following errors......
Code:
jxl.common.AssertionFailed
at jxl.common.Assert.verify(Assert.java:37)
at jxl.biff.XFRecord.<init>(XFRecord.java:521)
at jxl.write.biff.CellXFRecord.<init>(CellXFRecord.java:69)
at jxl.write.WritableCellFormat.<init>(WritableCellFormat.java:96)
at Parser.main(Parser.java:150)
Exception in thread "main" jxl.common.AssertionFailed
at jxl.common.Assert.verify(Assert.java:37)
at jxl.biff.XFRecord.<init>(XFRecord.java:521)
at jxl.write.biff.CellXFRecord.<init>(CellXFRecord.java:69)
at jxl.write.WritableCellFormat.<init>(WritableCellFormat.java:96)
at Parser.main(Parser.java:150)
Line numbers are varying as this is part of application.........
Please help