Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

SilkTest Question 18: How to read data from Microsoft Excel worksheet?

0
Posted

SilkTest Question 18: How to read data from Microsoft Excel worksheet?

0
Anonymous

 

To my mind one of the best programs for this situation would become the next tool. Because of it assisted me couple times and made it very effective. It is able to help here as well – excel 2007 recovery tool.
0

For QA purposes we are trying to read a block of cells from Excel spreadsheet and use values later for creating data driving automated test. The testing process set up in such way that we don’t want to use exact column names and prefer to just get data from cell numbers specified for example as B4:D11. Basically we want to obtain the cell values for all spreadsheet cells from B4 to D11 and print them out. Try to create your test script based on the following code [] hDBC = DB_Connect (“DRIVER=Microsoft Excel Driver (*.xls); FIRSTROWHASNAMES=1;READONLY=FALSE; DRIVERID=790;DBQ=C:\QA.xls”) [] //run a SQL statement [] hSQLq = DB_ExecuteSQL (hDBC, “SELECT * from [Sheet1$B4:D11]”) [] //while there are still rows to retrieve [-] while DB_FetchNext (hSQLq, description, var1, var2) [] print(“{++i}:{ description } { var1} { var2} !”) [] [] DB_Disconnect(hDBC) For training purposes you have to take a look at SilkTest user manual for the following functions: • DB_Connect • DB_ExecuteSQL • DB_Fetch

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123