+ Reply to Thread
Results 1 to 5 of 5

Saving as CSV with double quotes

  1. #1
    Registered User
    Join Date
    04-20-2015
    Location
    Madrid
    MS-Off Ver
    2010
    Posts
    85

    Saving as CSV with double quotes

    Hi everyone!

    I'm trying to save an Excel file as CSV so that the end result would have double quotes " " around each data.
    I've tried by adding a double quote within a double quote around each cell (""""content"""") in the Excel sheet, which returns the content in this fashion -> "content".
    However when I save the file as CSV, the content looks like this -> """content""".. it has two more double quotes on each sides.

    Is there anyway to have only one double quote on each side?

    Also, here are the conditions that have to be met to achieve this:
    1. No VBA/Macro
    2. No other format (such as txt). Has to be saved exactly as CSV
    3. I'm using formulas for each cell, so changing the format type as "Text" or any other format that bypasses the formula is a no-go.

    Hopefully someone can help.
    Thanks!

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Saving as CSV with double quotes

    If you don't mind having non-straight double quotation marks, then you can use CHAR(147) / CHAR(148) / CHAR(152)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    will give “content”

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    will give ˜content˜

    Is that something you can work with?
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    04-20-2015
    Location
    Madrid
    MS-Off Ver
    2010
    Posts
    85

    Re: Saving as CSV with double quotes

    Quote Originally Posted by Aardigspook View Post
    If you don't mind having non-straight double quotation marks, then you can use CHAR(147) / CHAR(148) / CHAR(152)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    will give “content”

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    will give ˜content˜

    Is that something you can work with?
    Hi Aardigspook,

    Unfortunately I need it to be straight double quotation marks, as I will use it elsewhere as a text qualifier. Unless non-straight double quotation marks will pass for normal quotation marks in general terms.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Saving as CSV with double quotes

    If you're using it as a text qualifier, would you be able to specify the qualifier as the non-straight ones instead? If not, then I'm sorry but I can't think of anything else - any time that Excel saves or exports to a text format (or similar-to-text format such as csv) there are problems like this. For csv, the quotation marks are added so that commas inside columns aren't treated as delimiters for columns - and to preserve spaces correctly. (More info here: http://www.csvreader.com/csv_format.php)

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Saving as CSV with double quotes

    What is the context of "I need it to be straight double quotation marks, as I will use it elsewhere as a text qualifier?" Is this in Excel or the CSV file.
    Can you upload an Excel file with a little data and the corresponding CSV file with the results that you want?

    Directions:
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Saving spreadsheet as text without unwanted double quotes (")
    By Tempe_VBA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2014, 10:14 PM
  2. [SOLVED] Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes
    By tkuy2k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-16-2013, 09:54 AM
  3. Save to a CSV with Double Quotes EXCEPT the First Column with NO Quotes
    By justforthis1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-13-2013, 07:02 PM
  4. [SOLVED] Double Quotes using Chr(34) and Extra Quotes when saving as text file
    By vamosj in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-26-2013, 12:26 PM
  5. Export to CSV with double quotes but ignore items that have quotes
    By capnhud in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2010, 03:13 PM
  6. Setting a cell's value as a formula containing quotes or double quotes using vba
    By Metshrine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2006, 04:10 AM
  7. double quotes when saving in CSV
    By Kozmos241 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2005, 05:06 PM

Tags for this Thread

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