+ Reply to Thread
Results 1 to 9 of 9

Export sheet as CSV with comma delimiter and double quote (") as indicator

  1. #1
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Export sheet as CSV with comma delimiter and double quote (") as indicator

    Hello everyone,

    The title explains it all. I would like to export a sheet which looks like the one below to a CSV which looks like the one at the bottom of this post.

    Thanks in advance.

    Kind regards,

    Marco

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    hi Marco, option, please check if it's what you are after. Save xlsm file and press Run button or run code "test"
    Attached Files Attached Files

  3. #3
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    Hi watersev.

    Thank you for the reply! The output looks great!
    However, I tried to implement this on my workbook now, but my data starts on A2.

    So I tried to change the code to:
    Please Login or Register  to view this content.
    With this I receive an error on:
    Please Login or Register  to view this content.
    After this I tried changing the code to:

    Please Login or Register  to view this content.
    With this, the CSV file is created, but on the bottom is an extra line with:
    Please Login or Register  to view this content.
    How can I fix this?

    Thanks in advance!

    Kind regards,

    Marco

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    1st change:
    Please Login or Register  to view this content.
    2nd change:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    if that errors out as well or result is not as expected post your file with data

  6. #6
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    Thank you for the reply. I'm not sure if I did correctly, it still gives an error.

    I added an example of my data.

    Kind regards,

    Marco
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    what is expected result in the result file if the cell contains calculation error - M7,M13?

  8. #8
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    These cells don't have a calculation error for me as this code solves that for me in ThisWorkBook.
    31.30 and -32.95 are the results though, respectively.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Export sheet as CSV with comma delimiter and double quote (") as indicator

    try this:

    Please Login or Register  to view this content.

+ 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