Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Create Delimited String that will paste into excel

Posted on 2008-06-16
5
Medium Priority
?
910 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
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

782 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