PowerShell: convert a column of data to a delimited string

Given a column of data (e.g. in Excel, Sheets), convert it to a delimited string (using PowerShell)
If I have data like this in a spreadsheet:

I want to create a single delimited string from that:

487,4443,576,224

This is one way:

Gist.


However, those were numbers/integers, so nice and easy.

If I now make one of them an alphanumeric…



… not so smooth this time:

Neither Sheets nor Excel will surround alphas with the necessary quotes. If we do that by hand…

, then this time no objections, and the quotes have been removed, which for my purposes is what I want anyway:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s