Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

how to write results in to the excel sheet using webdriver

View previous topic View next topic Go down

how to write results in to the excel sheet using webdriver

Post by iamangel on Tue Nov 20, 2012 2:11 am

Hi friends,

i jus know who to extarct data from the excel sheets ...and i would like to know how to write results in to the xcel sheet..

i have googled and didnt found any info regarding that...so i posted here..hope someone finds the ri8 way

waiting for reply...

iamangel

Posts : 2
Join date : 2012-11-08

Back to top Go down

Re: how to write results in to the excel sheet using webdriver

Post by degaleesanp on Sat Jan 19, 2013 8:56 pm

Hi iamangel,

Would you find the solution ??

degaleesanp

Posts : 5
Join date : 2013-01-19

Back to top Go down

Re: how to write results in to the excel sheet using webdriver

Post by SunnyBoy on Wed Mar 20, 2013 7:33 pm

Hi,

1st make sure you have jxl.jar file associated with your project[if your using add jar file to the project] and then

create Excel file as TestResults.xls

create functions as you want but here i named the function as fnUpdateResult and below is the code..

public static void UpdateResult(String Actual, String Value,String Result) throws BiffException, IOException, WriteException{
int SINo = 0;

Workbook workbook = Workbook.getWorkbook(
new File(".\\TestResults.xls"));
WritableWorkbook copy = Workbook.createWorkbook(
new File(".\\TestResults.xls"),workbook);


WritableSheet sheet2 = copy.getSheet(
"Sheet1");
int Row_Num = sheet2.getRows();



Label label3 =
[size=9]new
Label(1,Row_Num,Actual);
sheet2.addCell(label3);
Label label4 =
new Label(2,Row_Num,Value);
sheet2.addCell(label4);
Label label5 =
new Label(3,Row_Num,Result);
sheet2.addCell(label5);



}
[size=9]catch
(Exception e){
System.
out.println(e); }

copy.write();
copy.close();
workbook.close();


}
[/size][/size]

Now you have the code to generate result

SunnyBoy

Posts : 3
Join date : 2013-03-20

Back to top Go down

Re: how to write results in to the excel sheet using webdriver

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum