views:

60

answers:

1

i'm getting a syntax error on row.createCell line

Multiple markers at this line
    - Syntax error on token "createCell", = expected after 
     this token
    - Syntax error on token(s), misplaced construct(s)

this is the code

HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
HSSFRow row = sheet.createRow((short)2);
row.createCell(0).setCellValue(1.1);
+1  A: 

Where are these statements? If they're in the field declaration section of a class, then the last statement can't appear there.

Steve Emmerson