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
Nicholas Paldino [.NET/C# MVP] - 07 Sep 2004 17:14 GMT
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.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Hi, Group
>
[quoted text clipped - 5 lines]
> Best Regard
> Mario
ClayB [Syncfusion] - 07 Sep 2004 17:30 GMT
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
> Hi, Group
>
[quoted text clipped - 5 lines]
> Best Regard
> Mario
Niki Estner - 07 Sep 2004 19:19 GMT
> 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
Tommy Carlier - 08 Sep 2004 11:52 GMT
> Hi, Group
>
[quoted text clipped - 5 lines]
> 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();