Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

Clipboard Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mario Reiley - 07 Sep 2004 16:14 GMT
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();

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.