![]() |
Excel formulas and QTP - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Excel formulas and QTP (/Thread-Excel-formulas-and-QTP) |
Excel formulas and QTP - bis - 07-11-2008 I have an excel sheet its pretty simple 4 columns of data 10 rows of data. Column A is just text (there is another problem i will talk about later) Column B is just a number Columns C and D were giving me problems i was using Code: =RANDOMBETWEEN(1,50) Code: =INT(RAND()*50+1) now my questions. when (if) my script fails it puts a lock on the .xls that i am loading is there a way to force the xls closed. I dont know what language QTP uses for scripting but i know that if i open a file in C# i can force it closed after i am done with it. i am using Code: DataTable.ImportSheet "C:\4week\test.xls", 1, "Action1" also does the scripting language support sending an email? or would i be able to use QTP to load up a seperate application to send me an email with the results from the test and a copy of the data? lastly the other problem i was having is i wanted to randomize the data that is in column A to do this i'm using Code: =INDEX(Z$4:Z$46,RANK(Y4,Y$4:Y$46)) but when it loads into the QTP data sheet i get an error. any ideas? RE: Excel formulas and QTP - gammaflare - 07-23-2008 now my questions. when (if) my script fails it puts a lock on the .xls that i am loading is there a way to force the xls closed. I dont know what language QTP uses for scripting but i know that if i open a file in C# i can force it closed after i am done with it. i am using Code: DataTable.ImportSheet "C:\4week\test.xls", 1, "Action1" ![]() also does the scripting language support sending an email? or would i be able to use QTP to load up a seperate application to send me an email with the results from the test and a copy of the data? ![]() lastly the other problem i was having is i wanted to randomize the data that is in column A to do this i'm using Code: =INDEX(Z$4:Z$46,RANK(Y4,Y$4:Y$46)) but when it loads into the QTP data sheet i get an error. any ideas? [/quote] ![]() RE: Excel formulas and QTP - bis - 07-26-2008 yeah i have 1 column "y" with 46 cells of data in those cells is =RAND() in column "z" i have cells 1-46 with a random word in them what =INDEX(Z$4:Z$46,RANK(Y4,Y$4:Y$46)) does is rank the "z" column of names based on the rank of random number that is generated in y it works fine in excel but does not work at all in QTP |