Forum Discussion

bobo2001's avatar
bobo2001
New Contributor
11 years ago

Copy Paste of a Excel sheet

Hello Folks,



we have a specially requirement during a test scenario.



Scenario:



1. A customer choose a contract which is created in an excel file.



2. the Customer edit the excel.xlsx  file.



3. the customer select  the complete sheet or a range(header + data fields) and press copy



4. paste the data into a web form.



5. press submit



I have no idea how to handle the "copy paste" action. I tried to read from the excel

file line by line. But in that case the "TAB" separator are not correct insert into the 

web form.



Can anybody help me?



best regards





























1 Reply

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    For a simple way of handling this you could use the .Keys method to send control + c to copy the text, then parse the text however you want with Sys.Clipboard, then finally use control + v to paste the text.

    Ex:



    object.Keys("^c");

    Sys.Clipboard = someFunctiontoParseText(Sys.Clipboard);

    object2.Keys("^v");