LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default .NET Interop Copy all cells from Worksheet to Clipboard

Hey,

Does anyone know how to copy all cell contents from a Sheet to the clipboard?

I tried:

Excel.ApplicationClass oExcelApp;
oExcelApp = new Excel.ApplicationClass();
oExcelApp.DisplayAlerts = false;
oExcelApp.Workbooks.Open(fileName.ToString(),
System.Reflection.Missing.Value, false, System.Reflection.Missing.Value,
System.Reflection.Missing.Value, System.Reflection.Missing.Value, true,
System.Reflection.Missing.Value, System.Reflection.Missing.Value,
System.Reflection.Missing.Value, false, System.Reflection.Missing.Value,
System.Reflection.Missing.Value, System.Reflection.Missing.Value,
System.Reflection.Missing.Value);

Excel.Range range = oExcelApp.Cells;
range.Select();
object dest = new object();
range.Copy(dest); <- i got a nice Exception here :-(

Thanks Dudes

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Cells from C# and Interop Bjacaruso Excel Programming 0 October 11th 06 05:26 PM
Copy & paste cells fr open worksheet then close the worksheet Sin Excel Programming 1 October 2nd 06 02:20 PM
Copy (removing blank cells) without clipboard [email protected] Excel Programming 8 February 6th 06 12:32 AM
worksheet change event with .NET interop stavro Excel Programming 0 June 16th 05 05:57 PM
using the clipboard to avoid VBA / Interop Bob[_65_] Excel Programming 2 April 14th 05 02:23 PM


All times are GMT +1. The time now is 03:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"