Search
 
 

Display results as :
 


Rechercher Advanced Search

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 Today at 7:16 pm


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