How to write to excel cell using JXL library?

281 views
Skip to first unread message

fmtjatt

unread,
Dec 5, 2012, 2:24:10 PM12/5/12
to webd...@googlegroups.com
Hi All,

I need to grab some run-time value and store it in excel-sheet cell. Can anyone tell me how to write it to a specific sheet/cell using JXL 2.6 jar library. I'm reading the value using following method:

 public  String ReadCell(int column,int row)
     {
          return wrksheet.getCell(column,row).getContents();
     }
 
Thanks

Amit Agarwal

unread,
Dec 6, 2012, 5:57:29 AM12/6/12
to webd...@googlegroups.com
Hi Gagan,
You can use method addCell from WritableSheet with following syntax,

WritableSheet sheetObject.addCell(new Label(col,row , content))


Good luck :)

Amit


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/OSddiqUhohgJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

Reply all
Reply to author
Forward
0 new messages