Excel CSV Output

  ArrGee 17:20 18 Mar 2007

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?


  VoG II 18:09 18 Mar 2007

click here may help.

  ArrGee 18:13 18 Mar 2007

Cheers VoG™

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

  ArrGee 18:28 18 Mar 2007

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 2007

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 2007

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


  VoG II 22:23 18 Mar 2007

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

  ArrGee 09:01 19 Mar 2007

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!


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

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

The secrets of creating gory VFX

How to update iOS on iPhone or iPad

WhatsApp : comment lire vos messages sans que l’expéditeur le sache