Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Create Delimited String that will paste into excel

Posted on 2008-06-16
5
Medium Priority
?
908 Views
Last Modified: 2013-11-07
in vb.net, what I want to do is lets say my string exists as

200, 300, 400, 5000, 6000

I am thinking I have created a comma deliminated string. The next step is to copy it to the clipboard so that the user can go and copy paste these values into notepad or excel.
The problem is if they go into excel it goes and pastes all the values into one cell it appears all in one cell.

Thanks for any help.
0
Comment
Question by:scorpion53061
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21796634
You have created a comma-delimited string, but Excel imports comma-delimited strings from FILES, not from the Paste buffer.

I don't know if Dynamic Data Exchange (DDE) is still supported, but that technology allowed what you are trying to do - however, it was not for the faint of heart.
0
 

Author Comment

by:scorpion53061
ID: 21796686
well I do know if I replace the comma with a tab it will do what I am seeking. There shoudl be a way to do it with the comma.
0
 
LVL 13

Expert Comment

by:joechina
ID: 21796741
When I copy a delimited string to Excel, I get a little hint to let me select Text Import Wizard...
Your string looks fine to me.
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 21797100
"well I do know if I replace the comma with a tab it will do what I am seeking."

So replace the Commas with Tabs...    =O

        Dim data As String = "200, 300, 400, 5000, 6000"
        Clipboard.SetText(data.Replace(", ", ",").Replace(",", vbTab))

"There shoudl be a way to do it with the comma."

Why "should" it work with a comma?...
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21797697
dunno about the asker, but I've just learned a few things about Excel that I'd completely forgotten...apologies for earlier bad advice and thanks to others for better suggestions....
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question