This is a migrated thread and some comments may be shown as answers.

writing data to excel sheet

26 Answers 395 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Madhu
Top achievements
Rank 1
Madhu asked on 30 Dec 2010, 01:12 AM

Hi,

 

I’m using trail version of QA edition Q3 release. I want to know is there any feature which will helps me writing data to excel sheet?

More clear; in my Silverlight web application I created some data, I want to store that data in excel spread sheet using this Web UI QA tool.

 

Help is appreciated.

 

Thanks & Regards,

 

Madhu Tekmal

26 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 31 Dec 2010, 04:58 AM
Hi Madhu,
    WebUI Test Studio includes the Element Extraction feature which you'll probably want to use.

Check out this video:
http://tv.telerik.com/watch/automated-testing-tools/using-element-extraction-variables-webui-test-studio

Once you've extracted a value you can access it from a Coded Step with the following code:
String extractedValue = this.GetExtractedValue("MyExtractedVariableName");

To add a Coded Step on ScriptStep in the Record View (see screenshot 1). This will create a new (C# or Visual Basic) method where you can write your own logic.

You'll have to write your own logic to store data into an Excel file. It's not very complex and you'll find plenty of tutorials on the Internet.
Keep in mind that it will probably require that additional Assembly references to your project. Here's an article that describes how this is done in case you need to do it.

Let me know if you need more assistance with this!

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Madhu
Top achievements
Rank 1
answered on 31 Dec 2010, 08:05 PM
Hi Stoich,

Thanks for detailed solution.

I'm able to extract value into a variable [$(Result)], now trying to add Assembly Reference (Microsoft.Office.Interop.Excel.dll) from C:\WINDOWS\assembly to my project, but it doesn't work (see enclosed video capture). The same DLL trying to drag to other location also not working? If DLLs are in other location say C:\Program Files\Telerik\WebUI Test Studio 2010.3\Bin those are adding without any issue. Bottom line: C:\WINDOWS\assembly DLLs are unable to add to Project References under User Settings.

Suggestion/Request: Storing extracted values into Excel sheet is common in as part of test automation; adding DLLs and writing a code to store data back to excel is challenging to testers more over time consuming. Anyway, we are binding a data source in the form of excel/csv taking the reference of the column name in excel and store extracted value into the same column?
0
Accepted
Stoich
Telerik team
answered on 04 Jan 2011, 05:10 PM
Hi Madhu,
   don't add them from the Global Assembly Cache (C:\Windows\assembly). That's not really a folder in the normal sense of the word.

Instead add them from their "real" location on the file system. (like I'm doing in this video). After you add an Assembly take a look at the name under which the assembly was added to the list. If the name consists of the path to the location of the DLL file then you'll need to add it to the Global Assembly Cache as described in this article this article.

I've created feature request:
103917:FR> Writing data to excel sheet (instead of reading as in Data Binding)
to address your request. We'll discuss it soon.

I hope this helps!

Let me know if you have any more questions.

Best wishes,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Accepted
Mercedes
Top achievements
Rank 1
answered on 10 Jan 2014, 02:51 PM
Hello Stoich,
           Has the feature request to write data to excel been completed?

Thank you
0
Madhu
Top achievements
Rank 1
answered on 14 Jan 2014, 02:01 PM
Hello Support,

Any updates on this please? Requested this feature almost 3 years back!

Thanks,
Madhu
0
Boyan Boev
Telerik team
answered on 15 Jan 2014, 12:41 PM
Hi,

@Madhu, did Stoil approach help you? Do you need some additional help with your case? Please do not hesitate to contact us.

@Brian, please elaborate on your case a bit more. What assistance do you need? We will be glad to help you if you share some more detailed information.

You can also raise a support ticket so we can investigate your issue further. 

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mercedes
Top achievements
Rank 1
answered on 20 Jan 2014, 02:11 PM
Hello Boyan,

I was inquiring to the status of the feature request mentioned below:

103917:FR> Writing data to excel sheet (instead of reading as in Data Binding)

Thank you.
0
Boyan Boev
Telerik team
answered on 23 Jan 2014, 12:04 PM
Hello Brian,

The feature request is not developed yet because it is very common.

Please go ahead and submit a private ticket with your custom case and we will be glad to help you/customize the FR.

Thank you!

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Nate
Top achievements
Rank 1
answered on 30 Jan 2014, 03:48 PM
try{
 System.Data.OleDb.OleDbConnection MyConnection ;
 System.Data.OleDb.OleDbCommand myCommand = new System.Data.OleDb.OleDbCommand();
 string connectionpath =" "; //Include Directory path and filename here
 MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ connectionpath +";Extended Properties=\"Excel 8.0;HDR=No;\""); 
 MyConnection.Open();
 myCommand.Connection = MyConnection;  
string Variable = "foo"
 myCommand.CommandText = ("UPDATE [Sheetname$A2:A2] SET F1='" + Variable + "'"); //Set cell A2 in the sheet "Sheetname" F1 (is the field) to the Variable string
 myCommand.ExecuteNonQuery(); 
 MyConnection.Close();
}
catch (Exception ex)
{
    Log.WriteLine(ex.ToString());
}
0
Nate
Top achievements
Rank 1
answered on 30 Jan 2014, 03:50 PM
​string Variable = "foo"  "
needs a semicolon and should be:


string Variable = "foo";
0
Boyan Boev
Telerik team
answered on 03 Feb 2014, 12:40 PM
Hello Nate,

Thank you for sharing your knowledge.

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
nidhi
Top achievements
Rank 1
answered on 13 Oct 2014, 03:36 PM
I am using above script to store data in excel but i am getting this error.

LOG: System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format.
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
0
Boyan Boev
Telerik team
answered on 15 Oct 2014, 02:24 PM
Hello Nidhi,

This exception doesn't come from Test Studio. It is pure Microsoft Office exception. 

"External table is not in the expected format." typically occurs when trying to use an Excel 2007 file with a connection string that uses: Microsoft.Jet.OLEDB.4.0 and Extended Properties=Excel 8.0

Here is a fast Google search about it.

Hope it helps.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
soumya
Top achievements
Rank 1
answered on 14 Nov 2016, 12:23 PM

error CS1705: Assembly 'ArtOfTest.WebAii.Design, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d' uses 'Telerik.TestStudio.Interfaces, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de' which has a higher version than referenced assembly 'Telerik.TestStudio.Interfaces, Version=2013.1.1002.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'

 

 

 

 

i am geting this error

0
soumya
Top achievements
Rank 1
answered on 15 Nov 2016, 05:11 AM

Hi Support 

Can anyone please help me in this 

 

regards

Soumya

0
Madhu
Top achievements
Rank 1
answered on 15 Nov 2016, 01:50 PM

Hi Soumya,

Looks like your Telerik assembly file corrupted, try re-installing Telerik TestStudio (latest version) and assembly files.

Thanks,

Madhu.

0
soumya
Top achievements
Rank 1
answered on 15 Nov 2016, 02:01 PM

Hi madhu 

when i try to run the same in another machine i faced the same issue .

0
Madhu
Top achievements
Rank 1
answered on 15 Nov 2016, 02:26 PM

Can you check your TestStudio settings showing excel assembly? see attached.

 

 

0
soumya
Top achievements
Rank 1
answered on 15 Nov 2016, 02:28 PM
Yes madhu it does have it
0
soumya
Top achievements
Rank 1
answered on 15 Nov 2016, 02:31 PM

still getting the below error

error CS1705: Assembly 'ArtOfTest.WebAii.Design, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d' uses 'Telerik.TestStudio.Interfaces, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de' which has a higher version than referenced assembly 'Telerik.TestStudio.Interfaces, Version=2014.3.903.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'

0
soumya
Top achievements
Rank 1
answered on 15 Nov 2016, 02:32 PM

error CS1705: Assembly 'ArtOfTest.WebAii.Design, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d' uses 'Telerik.TestStudio.Interfaces, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de' which has a higher version than referenced assembly 'Telerik.TestStudio.Interfaces, Version=2014.3.903.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'

 

Still getting the below error

 

Madhu is there any other way i can get in touch with you.need urgently to fix this for a demo

0
soumya
Top achievements
Rank 1
answered on 15 Nov 2016, 02:33 PM
is there any way i can get in touch with u 
0
Madhu
Top achievements
Rank 1
answered on 15 Nov 2016, 02:40 PM

Yes.

madhu.tekmal@clearstructure.com

0
Boyan Boev
Telerik team
answered on 17 Nov 2016, 07:55 AM
Hi Soumya,

Have you tried the suggestion I've given to you in your other thread?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
soumya
Top achievements
Rank 1
answered on 17 Nov 2016, 08:28 AM

Hi Boyan

Thanks for the reply but i am still not able to write data into the excel sheet.Seems telerik is not a cup of my tea.

can you please spend some time with me to fixing the excel issue .If so please let me know i would send u a meeting intive

0
Elena
Telerik team
answered on 17 Nov 2016, 01:07 PM
Hi Soumya,

I have posted a reply to your query in the other thread you shared your difficulties. Please refer to it for further information. 

I would like to kindly ask you to avoid posting duplicate queries in different threads since this could bring to misunderstandings and double efforts from both sides. Thanks in advance for your understanding.   

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Madhu
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Madhu
Top achievements
Rank 1
Mercedes
Top achievements
Rank 1
Boyan Boev
Telerik team
Nate
Top achievements
Rank 1
nidhi
Top achievements
Rank 1
soumya
Top achievements
Rank 1
Elena
Telerik team
Share this question
or