Forum Discussion

Oussama's avatar
Oussama
Occasional Contributor
11 years ago
Solved

Copy data from an application to excel sheet

Hello,

I would like to copy data from my application to an Excel sheet. (I use Select ALL then copy in my application and i like to paste selected data into an Excel sheet)

 

Could you please help me ?

 

  • Hi Oussama,

     

    The code below can insert the copied text into Excel. However, I'm not sure if the formatting will be fine:

    Sys.Process("EXCEL").Window("XLMAIN", "Book1 - Excel", 1).Keys(“^V”)

     

     

    If you want to make sure that all the columns and cells are filled in properly, I would suggest that you consider working with Excel via its COM object.

2 Replies

  • Hi Oussama,

     

    The code below can insert the copied text into Excel. However, I'm not sure if the formatting will be fine:

    Sys.Process("EXCEL").Window("XLMAIN", "Book1 - Excel", 1).Keys(“^V”)

     

     

    If you want to make sure that all the columns and cells are filled in properly, I would suggest that you consider working with Excel via its COM object.

    • Oussama's avatar
      Oussama
      Occasional Contributor

      Thank you for the answer.