import java.io.File;
import jxl.Workbook;
import
jxl.format.Border;
import
jxl.format.BorderLineStyle;
import
jxl.format.Colour;
import
jxl.write.Label;
import
jxl.write.WritableCellFormat;
import
jxl.write.WritableSheet;
import
jxl.write.WritableWorkbook;
import
org.testng.annotations.AfterClass;
import
org.testng.annotations.BeforeTest;
import
org.testng.annotations.Test;
public class
SampleExcelStatus
{
@BeforeTest
public void setup() throws Exception
{
}
@Test
public static void SecondExcelFile() throws Exception
{
Workbook workbook = Workbook.getWorkbook(new File("E:/6409_TestCases_Checkout.xls"));
WritableWorkbook copywb = Workbook.createWorkbook(new File("E:/6409_TestCases_CheckoutResultsSatya.xls"), workbook);
WritableSheet
sheet1=copywb.getSheet(0);
for(int URowcount=12;
URowcount<sheet1.getRows();URowcount++)
{
Label label = new
Label(10,URowcount-1,"Pass");
WritableCellFormat cfobj=new
WritableCellFormat();
/*cfobj.setBackground(Colour.GREY_25_PERCENT);
cfobj.setAlignment(Alignment.LEFT);
cfobj.setOrientation(Orientation.HORIZONTAL);*/
cfobj.setBorder(Border.ALL,
BorderLineStyle.THIN,Colour.BLACK);
label.setCellFormat(cfobj);
sheet1.addCell(label);
}
copywb.write();
copywb.close();
workbook.close();
}
@AfterClass
public void tearDown()
{
// driver.close();
}
}
This comment has been removed by the author.
ReplyDeleteHi Sir, I always follow your blog. This is an excellent place for learning selenium easily and quickly. Can you please post one end-to-end steps to work with Selenium Grid.
ReplyDelete