Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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