canada faxing loan no payday payday loans quickest payday loan.com
1000 advance payday loan payday loans advance business loan payday start
payday car title loan payday loan consolidate loan payday
quick cash payday loan paydayloans paydayloansok
consolidation debt loan payday no fax payday loans low cost no fax payday loan
borrow loan money now payday preferred simplepaydayloan.com online payday loans borrow fast loan money payday service simple simplepaydayloan.com
no teletrack payday loans no fax payday loan payday loan new checking account
fee loan low online payday online payday loan service payday loan advances
d6oya faxless loan payday tinyurl.com instant payday loan advance cash faxless loan payday
advance cash loan loan now payday payday paydayloanpages.com payday advance loan payday advance loan arkansas
payday loan western union payday cash loan 1500dollarstoday.com advance cash loan loan online online payday personal
payday loans uk online payday loan cash cheap loan payday
advance cash fast get in loan online payday faxless payday loans 1500dollarstoday.com advance cash loan loan online online payday payday
payday loan in kansas payday loans online bad credit faxing loan no payday
account checking loan no payday savings online payday loan application easy payday loan faxless
advance america loan payday fast payday loans payday loans with bad credit
quickpaydayloan.com bad credit payday loans debt getting help loan payday
account loan online payday savings fast payday loan borrow fast loan money payday service simple simplepaydayloan.com
canada payday loan advance payday loan online payday loans no credit checks
advance cash inanchor loan payday faxless payday loan 1500 faxing loan no payday
payday loan fee payday loan company advance america payday loans
interest loan low payday rate quick payday loan advance cash loan loan payday payday tinyurlcom
Astrochimp » Export CSV with Any Delimiter

Astrochimp

Marcello Prattico

Export CSV with Any Delimiter

December 20th, 2005

When working with databases you often find yourself in the frustrating situation of loading a database from an Excel file. The usual solution is to save the Excel file as a .csv file from which you can split out the fields. Problems occur when your fields contain commas. Exporting as a tab separated list does not solve this issue since blank fields do not get parsed consistently. The solution would be to use a different character as the delimiter, but Excel does not provide an obvious way to export data with a delimiter that is not a tab or comma. There is a little known setting in Windows can solve you problems. You can set any character to use as your delimiter when saving an Excel file as a csv. The key is in Windows Regional Settings:

To change the default on your PC to a pipe rather than a comma bring up your default options window by clicking Start -> Settings -> Control Panel -> Regional Settings.

Click the “Number” tab and in the “List Separator” field, replace the current default separator with the one you want to use (let’s say a pipe symbol | ).

Click “OK” to save the change and close the window. You can now save Excel files as pipe delimited files by simply doing the following in Excel:

This is a huge time saver since I either would have to write out a regular expression to parse out the escaped commas or try to use Coldfusion to query the Excel file.

** Update ** : In Windows XP there is an extra step involved.
When you open the Regional settings window, you have to click customize next to the language choice drop down. That will bring up another window with “Numbers” as the first tab item. Change the “List separator” to whatever you want to use as a delimiter. Thanks to Adam for the update.

Source of the tip

16 Responses to 'Export CSV with Any Delimiter'

Subscribe to comments with RSS or TrackBack to 'Export CSV with Any Delimiter'.

  1. Lynne said,

    on February 3rd, 2006 at 11:35 am

    Thank you Thank you for this great tip!!! It has made my job so much easier for data conversion.

  2. Steve said,

    on March 29th, 2006 at 6:28 pm

    Excellent solution.

    Microsoft always thinks it knows best and that you need to things their way…
    Up yours M$

  3. Raji said,

    on June 6th, 2006 at 11:57 am

    I was searching for this in too many websites. You made my life easier.Thanks a lot !

  4. Lindsay said,

    on June 14th, 2006 at 7:26 pm

    I manually did a change from commas to pipes | in Word or something last time, but this is fantastic, and such a time-saver.
    Thanks heaps!

  5. Govindaraghavan S said,

    on May 11th, 2007 at 12:49 am

    This is the solution I was looking for. Thanks a lot !

  6. Adam said,

    on August 2nd, 2007 at 2:30 pm

    Great tip!

    Just a note on XP, after Regional and Language Options, you have to click on Customize on the Regional Options tab to access List Separator.

  7. sid said,

    on September 3rd, 2007 at 3:06 am

    I really appreciate your observation. I’ve been using XP for years now but didn’t care to explore on “Regional & Language Options” .

    Great Tip , You saved my Friday Night ;) else id be working all night long trying to figure out whats happening.

  8. Girish said,

    on September 4th, 2007 at 6:25 pm

    Fantastic tip. Saved me hours. Thanks for sharing.

    It’s a bit different on Vista though.

    Start -> Control Panel -> Regional and Language Options -> Formats (Tab) -> Customize this format (Button) -> Numbers(Tab) -> List Separator (Field)- Change that to comma or pipe or hyphen or whatever it allows.

  9. Edith said,

    on September 26th, 2007 at 2:17 pm

    Thank you!!! We needed the pipes delimiter to get a major project working!

  10. Kris T said,

    on October 9th, 2007 at 8:17 pm

    Great tip!! Saved a lot of time from breaking our heads!!

  11. bigpond said,

    on June 20th, 2008 at 8:27 am

    Hi,
    excellent tip, thank you very much

  12. Viraj said,

    on June 23rd, 2008 at 7:13 pm

    Fantastic Tip !!!!!!!!
    Saved me zillions of hours !!

  13. eysha said,

    on July 18th, 2008 at 4:37 am

    this is very helpful!..
    tnx for sharing!…^^

  14. clickitysplit said,

    on July 29th, 2008 at 1:13 pm

    A time tested solution, but I have definitely run into occasions when my data contained single pipe characters.

    A developer I met liked to use a series of 10 pipe characters, and he was able to easily generate these from non-Windows systems. These files never failed to import into SQL 2000 or 2005.

    In Windows XP, the list separator in Regional Settings permits 3 consecutive characters for a delimiter.

  15. RK said,

    on September 4th, 2008 at 7:27 pm

    what can i say.
    thanks to you for putting this up.
    thanks to google that this shows up bang on the top. first link.

  16. RV said,

    on September 16th, 2008 at 10:46 am

    That was a very useful tip. I have XP and I changed the comma to pipe.Thanks for sharing.

Comment on this