Kamal_chennai
9 years agoContributor
Solved
How to copy whole Excel workbook content
Hi, I want to copy all the rows and columns from Excel Worksheet to my TestComplete clipboard. I just tried with aqFile.ReadWholeTextFile(Path, TextCodingType) but i didn't get the correct wo...
- 9 years ago
You can do this using the Excel COM object, Excel.Application.
// JScript function Test() { var oExcel = Sys.OleObject("Excel.Application"); var oWb = oExcel.Workbooks.Open("C:\\Work\\TestBook.xlsx"); oWb.ActiveSheet.UsedRange.Copy(); oWb.Close(); oExcel.Quit(); Log.Message("See Additional Info", Sys.Clipboard); }