Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
iamangel
Posts : 2
Join date : 2012-11-08

how to write results in to the excel sheet using webdriver Empty how to write results in to the excel sheet using webdriver

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...
avatar
degaleesanp
Posts : 5
Join date : 2013-01-19

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

Sat Jan 19, 2013 8:56 pm
Hi iamangel,

Would you find the solution ??
avatar
SunnyBoy
Posts : 3
Join date : 2013-03-20

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

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
Sponsored content

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

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