Submitted by harrydev on Sun, 06/15/2014 - 14:18
We can pass the formatting information to Excel by overloading the constructor which takes an additional object containing the cell format information.
Formatting is required when ever you want to distinguish cell content with other cell contents. Generally, when we update the test cases in excel sheet, we keep all "PASS" in green color and Failed in Red color just to highlight the content.
The below syntax and example program helps to write data into excel sheet using formatting styles
Submitted by harrydev on Sun, 06/15/2014 - 13:40
The below example program explains how to write / set data in spreadsheet without any formatting such as fonts etc.
In order to write anything we need to first create a writable workbook as below which creates the workbook object.
WritableWorkbook workbook = Workbook.createWorkbook(new File("sampletestfile.xls"));
We can also use the existing excel sheet and write the data into excel sheet. But before doing write operations we need to make sure to take the copy of the original file
Submitted by kdevendraraju on Fri, 01/03/2014 - 13:28
Normally, to read a data in excel, first we should have access to workbook, sheet which we want to read as workbook contains multiple sheets and if you want to read a particular cell we need location of a Cell.
In this article, we will discuss how to access workbook, sheet and a Cell using Jxl library Download jxl jar and add it to build path.