Hi, Group

I need transfer a listView.Item's data control to Windows Clipboard for
retrive in MS-Excel or another program.

Some Idea , some code, may be WEB site which advisor will be wellcome.

Best Regard
Mario

Re: Clipboard Question by Nicholas

Nicholas
Tue Sep 07 11:14:00 CDT 2004

Mario,

This might be difficult depending on the type of data that you want to
place on the clipboard. If it is just a string, then you should be able to
place it on the clipboard no problem and have it pasted into Excel with no
problem.

However, other formats might be more difficult. What kind of data do
you want to place on the clipboard.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"Mario Reiley" <mreiley@cantv.net> wrote in message
news:%23v8Cr4OlEHA.1476@tk2msftngp13.phx.gbl...
> Hi, Group
>
> I need transfer a listView.Item's data control to Windows Clipboard for
> retrive in MS-Excel or another program.
>
> Some Idea , some code, may be WEB site which advisor will be wellcome.
>
> Best Regard
> Mario
>
>



Re: Clipboard Question by ClayB

ClayB
Tue Sep 07 11:30:26 CDT 2004

George Shepherd's Windows Forms FAQ contains an entry entitled:

How do I use the CSV clipboard format supported by Excel?

Check it out at:
http://www.syncfusion.com/faq/winforms/search/899.asp

=============================================
Clay Burch, .NET MVP

Syncfusion, Inc.
visit http://www.syncfusion.com for .NET Essentials


"Mario Reiley" <mreiley@cantv.net> wrote in message
news:%23v8Cr4OlEHA.1476@tk2msftngp13.phx.gbl...
> Hi, Group
>
> I need transfer a listView.Item's data control to Windows Clipboard for
> retrive in MS-Excel or another program.
>
> Some Idea , some code, may be WEB site which advisor will be wellcome.
>
> Best Regard
> Mario
>
>



Re: Clipboard Question by Niki

Niki
Tue Sep 07 13:19:53 CDT 2004

"ClayB [Syncfusion]" <clayb@syncfusion.com> wrote in
news:uDd8$fPlEHA.3428@TK2MSFTNGP11.phx.gbl...
> George Shepherd's Windows Forms FAQ contains an entry entitled:
>
> How do I use the CSV clipboard format supported by Excel?
>
> Check it out at:
> http://www.syncfusion.com/faq/winforms/search/899.asp

Note that you should not use ',' literally, but
CultureInfo.CurrentCulture.TextInfo.ListSeparator.
Different cultures, different commas.

Niki



Re: Clipboard Question by tommy

tommy
Wed Sep 08 05:52:18 CDT 2004

"Mario Reiley" <mreiley@cantv.net> wrote in message news:<#v8Cr4OlEHA.1476@tk2msftngp13.phx.gbl>...
> Hi, Group
>
> I need transfer a listView.Item's data control to Windows Clipboard for
> retrive in MS-Excel or another program.
>
> Some Idea , some code, may be WEB site which advisor will be wellcome.
>
> Best Regard
> Mario

1. Make a string with HTML-code: this code should describe the data in
an HTML-table
2. Copy the string to the clipboard in HTML-format. To do this, check
out this article I wrote:
http://realdevs.net/default.aspx?tabid=112&type=art&site=34&parentid=11

If you copy it like this, you can paste it in Excel, Word, Outlook,
...

To create the HTML-code, you code should look like this:

System.Text.StringBuilder builder = new System.Text.StringBuilder();
builder.Append("<table>");
for each row in table // pseudo-code
{
builder.Append("<tr>");
for each column in row // pseudo-code
{
builder.Append("<td>");
builder.Append(value); // here comes the value of the specific
cell
builder.Append("</td>");
}
builder.Append("</tr>");
}
builder.Append("</table>");
string html = builder.ToString();