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

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 • ... more.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions