+ Reply to Thread
Results 1 to 6 of 6

Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

  1. #1
    Registered User
    Join Date
    09-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

    I don't know much coding but if I want to add quotes in first column and no quotes in second column what changes do I need to make in module listed below. I have tried few things but it doesn't seem to work. I will kee trying but any help you can provide will be appriciated.

    Found this module in following post in this forum http://www.excelforum.com/excel-prog...no-quotes.html

    Thanks in advance for your help

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 09-15-2013 at 12:37 AM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

    Hi, patel45,

    I ran into trouble with your code which didnīt feature the quotes for the first Column with my test file as well as did double up on the contents of Column B of the file - maybe you could attach yourīs to have a look at it.
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Last edited by HaHoBe; 09-15-2013 at 05:01 AM.
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    09-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

    Thanks Patel45 and HaHoBe for your kind help.

    I have one more question. I need to export this csv file as txt file and it seems to be working fine but it is adding Extra quotes when I save this as text file. Is there anything else that can remove these extra quotes when I save as text file.

    Once again, thank you very much for your help.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

    Hi, tkuy2k,

    if you are using the extension txt instead of csv you should replace Write (for csv) with Print (for txt):
    Please Login or Register  to view this content.
    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    09-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Save to a CSV with Double Quotes EXCEPT the Second Column with NO Quotes

    This works. I am going to save a ton of time with this.
    Thank you very much for helping me.

+ 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. 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
  2. [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
  3. 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
  4. Replies: 2
    Last Post: 07-29-2009, 11:06 AM
  5. 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

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