Large amount of data on the clipboard

R

Robert Bravery

Hi all,

I'm using the following code to copy data from XL to the clipboard to be
later usied in a datatable
range = objSheet.get_Range("A22", "aa100");
range.Copy(Missing.Value).ToString();
xlcopydata = Clipboard.GetData(DataFormats.Text).ToString();
Clipboard.Clear();
But when I issue a excelapplication quite I get an dialog saying that I have
large amounts of data on the clipboard, do I want to keep it etc etc
How do I prohibit this message from apearing and making sure that onece the
data is copied to my string variable that the clipboard is cleared

Thanks
Robert
 
L

Larry Lard

Robert said:
Hi all,

I'm using the following code to copy data from XL to the clipboard to be
later usied in a datatable
range = objSheet.get_Range("A22", "aa100");
range.Copy(Missing.Value).ToString();
xlcopydata = Clipboard.GetData(DataFormats.Text).ToString();
Clipboard.Clear();
But when I issue a excelapplication quite I get an dialog saying that I have
large amounts of data on the clipboard, do I want to keep it etc etc
How do I prohibit this message from apearing and making sure that onece the
data is copied to my string variable that the clipboard is cleared

First thing I would do would be to use a clipboard viewer to see what
is on the clipboard after the above code has run, but before trying to
close Excel. If there is indeed nothing on the clipboard, I would go to
an Excel newsgroup and see if anyone there knows what is afoot. If
there is still stuff on the clipboard, I would check I was using
Clipboard.Clear correctly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top