How to get data from excel sheet to the script? write the
script.
Answer Posted / he he eheyyy he ... baa
Excel.Workbook workBook = app.Workbooks.Open(Path, 0,
true,
5,
"",
"",
true,
Excel.XlPlatform.xlWindows,
"\t",
false,
false,
0,
true,
1,
0);
//// Get The Active Worksheet Using Sheet Name Or
Active Sheet
Excel.Worksheet workSheet =
(Excel.Worksheet)workBook.ActiveSheet;
try
{
string[] email = new string[40];
for (int i = 1; i < email.Length; i++)
{
if (i <= 40 )
{
if
(((Excel.Range)workSheet.Cells[rowIndex, colIndex1]).Value2
!= null)
{
rowIndex = 2 + index;
string emailid =
((Excel.Range)workSheet.Cells[rowIndex,
colIndex1]).Value2.ToString();
//string[] email = new string[9];
//string lastName =
((Excel.Range)workSheet.Cells[rowIndex,colIndex2]).Value2.ToString();
//string emailid =
((Excel.Range)workSheet.Cells[rowIndex,
colIndex3]).Value2.ToString();
Class1.SendMail(emailid);
//Response.Write(emailid);
index++;
}
}
}
}
catch (Exception ex)
{
app.Quit();
Response.Write(ex.Message);
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain in brief about the quicktest professional automation object model?
1.explain end to end process of qc,2.how many tabs are in qc9.0,qc10.0 3.what is review, how many reviews are following in aproject 4.how will you get the requirements 5.why do we choose testing 6.how to export tc's and requirements to qc through add-ins
Hi Samrat, Thank u very much, what u said it is right.
Problem with XML checkpoint in QTP ?
Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in
What is the quicktest professional testing process?
i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework
Explain how you can delete excel file in qtp?
regular expression in qtp standar check point for months from accepting months from january to december only
Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln
Explain different checkpoints in qtp.
What ate the Technologies supported by QTP?
What are the Application Functions available in QTP?
What are the automation metrice in your project?
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?