+ Reply to Thread
Results 1 to 3 of 3

Excel to CSV: Formatting Quote Marks

Hybrid View

  1. #1
    Stephen
    Guest

    Excel to CSV: Formatting Quote Marks

    We have an application we use (MAS 500) that imports CSV files. We use

    Excel to create these files; however, since the last upgrade of our
    application, we are now required to have the header in each CSV file
    use the following format:

    "@HDR","BATCH","20060127","Daily 1/27/2006",""
    "@HDR","JOURNAL","","1"


    The problem is getting the quotation marks right. It will look fine in

    Excel, but no matter what I try, it won't give me the format above.
    Instead, the CSV file will have either no quote marks or double quote
    marks.


    I know that doubling up on quote marks is part of Excel's process of
    converting to CSV, and I understand why that is useful in most cases,
    but in this case it is just the opposite.


    Any suggestions?


  2. #2
    Dave Peterson
    Guest

    Re: Excel to CSV: Formatting Quote Marks

    I would think writing a macro to export the data exactly the way you want it
    would be the way to go:

    Some samples:

    Earl Kiosterud's Text Write program:
    www.smokeylake.com/excel
    (or directly: http://www.smokeylake.com/excel/text_write_program.htm)

    Chip Pearson's:
    http://www.cpearson.com/excel/imptext.htm

    J.E. McGimpsey's:
    http://www.mcgimpsey.com/excel/textfiles.html

    Earl's program has a supports lots of different options. You may want to see if
    that works for you right out of the box.

    If you're new to macros, you may want to read David McRitchie's intro at:
    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    Stephen wrote:
    >
    > We have an application we use (MAS 500) that imports CSV files. We use
    >
    > Excel to create these files; however, since the last upgrade of our
    > application, we are now required to have the header in each CSV file
    > use the following format:
    >
    > "@HDR","BATCH","20060127","Daily 1/27/2006",""
    > "@HDR","JOURNAL","","1"
    >
    > The problem is getting the quotation marks right. It will look fine in
    >
    > Excel, but no matter what I try, it won't give me the format above.
    > Instead, the CSV file will have either no quote marks or double quote
    > marks.
    >
    > I know that doubling up on quote marks is part of Excel's process of
    > converting to CSV, and I understand why that is useful in most cases,
    > but in this case it is just the opposite.
    >
    > Any suggestions?


    --

    Dave Peterson

  3. #3
    Bill Sharpe
    Guest

    Re: Excel to CSV: Formatting Quote Marks

    Stephen wrote:
    > We have an application we use (MAS 500) that imports CSV files. We use
    >
    > Excel to create these files; however, since the last upgrade of our
    > application, we are now required to have the header in each CSV file
    > use the following format:
    >
    > "@HDR","BATCH","20060127","Daily 1/27/2006",""
    > "@HDR","JOURNAL","","1"
    >
    >
    > The problem is getting the quotation marks right. It will look fine in
    >
    > Excel, but no matter what I try, it won't give me the format above.
    > Instead, the CSV file will have either no quote marks or double quote
    > marks.
    >
    >
    > I know that doubling up on quote marks is part of Excel's process of
    > converting to CSV, and I understand why that is useful in most cases,
    > but in this case it is just the opposite.
    >
    >
    > Any suggestions?
    >

    How about editing the first two lines of the CSV file to replace double
    quote marks with single quote marks?

    Bill

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1