Using Excel Interop

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bob

    #1

    Using Excel Interop

    Im trying to figure out how to copy and paste cells in an
    excel spreadsheet using the Excel Interop.

    so far ive got...

    Microsoft.Offic e.Interop.Excel .Range wksRange;
    wksRange = wks.get_Range(" A1", "D1");
    wksRange.Select ();

    that selects the four cells i want. But i dont know how
    to copy and paste. i tried...

    wksRange.Cells. Copy(...);

    but it wants an Object Direction inside the brackets and
    im not sure what that exactly means.

    I recorded a macro in excel and looked at the vb editor
    but that didnt provide much help.

    any suggestions?
Working...