Excel CSV Output

  ArrGee 17:20 18 Mar 07
Locked

I have created a spreadsheet which has UK county names across row 1 in several columns.

Running down each column, under the county name, are cells with individual city and town names.

These need to be exported for use in a web design application for a drop-down menu. However, the application will only accept data for the drop-down in this format:

Ascot, Binfield, Bracknell, Bray, etc. (i.e; as one long comma separated string)

Is there any way I can output such a string from Excel? What would it be output to and would it be a simple matter of cut and paste from there?

Cheers

  VoG II 18:09 18 Mar 07

click here may help.

  ArrGee 18:13 18 Mar 07

Cheers VoG™

I'm just having a run through your link now.

  ArrGee 18:28 18 Mar 07

Sorry mate, I tried it but on running the macro I received a run-time error 1004, 'no cells were found.

Any ideas?

  daba 19:07 18 Mar 07

Saving an Excel sheet as a CSV will output the contents Row by Row.

Could your towns/cities be Across the page, and the Counties down column 1 ? then your csv text strings would be as you want them.

Could be a problem though if you have more than 255 towns/cities in any county. Whats the last row number (corresponding to the largest number of towns/cities in a county) ?

If less than 256 - select ALL your data, copy, then, in a new sheet "Paste Special, Transpose" will put the data the right way up to save the sheet as CSV in the format you need.

eg. Oxfordshire, Banbury, Oxford, Kidlington, Abingdon,..... etc..

I think later versions of excel allow more than 256 columns /=/ 256 towns/cities per county....

VoG will know..

  ArrGee 19:37 18 Mar 07

That's done the trick, many thanks to both of you.

Cheers

  VoG II 22:23 18 Mar 07

Glad you are sorted - I was occupied with visitors hence the quick link and lack of subsequent response.

  ArrGee 09:01 19 Mar 07

Visitors eh? Who needs 'em?!

Thanks for having a look though. Now all I need is some equally excellent talent to take a look at my post in Webdesign!

Cheers

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Method Studios' title sequence for BBC series Taboo is truly unsettling

Best Pages for iOS tips | How to use Pages for iPad & iPhone: 6 simple tips to get more out of…