+ Reply to Thread
Results 1 to 6 of 6

How to remove quotation marks from my worksheet output ?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Microsoft 365 (Subscription)
    Posts
    192

    How to remove quotation marks from my worksheet output ?

    Hello,

    I have an excel program that reads a file and prints it to the work sheet, but I can't figure out why it puts quotation marks around the line of text. I would like to remove the quotation marks from column A and column D. Does any one have an easy solution? Thanks!
    redsab
    Attached Files Attached Files
    Last edited by redsab; 07-16-2014 at 09:00 PM.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How to remove quotation marks from my worksheet output ?

    your csv file has quotation marks around every line which is why its putting it your file at start and end
    "Employee ID,First Name,Last Name, Salary"

    Change this line
    line = txtstrm.ReadLine
    to
    line = Replace(txtstrm.ReadLine, Chr(34), Chr(32))
    ^^ this code just replaces the " with space
    Last edited by humdingaling; 07-16-2014 at 08:25 PM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Microsoft 365 (Subscription)
    Posts
    192

    Re: How to remove quotation marks from my worksheet output ?

    humdingaling, Thanks for noticing the quotes. I used Excel to write the .csv file and it must automatically place quotes for each line, because my original file did not have quotes. Well, I like your version better than mine, I'll use that, thanks!
    redsab

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,800

    Re: How to remove quotation marks from my worksheet output ?

    The reason you are getting quotes in your output is that there are quotes in your CSV file. This is what it looks like if you open it in a text editor instead of Excel:

    "Employee ID,First Name,Last Name, Salary"
    "222312,Marc,Ariberti,933710.4"
    "29287,Stephan,Assmus,123005.4"
    "268218,Olivier,Aubert,1126515.6"
    "262737,Sigmund,Augdal,1103495.4"
    "122696,Pierre,Baillet,515323.2"
    "114502,Gildas,Bazin,480908.4"
    "53983,Rocky,Bernstein,226728.6"
    "190374,Stephane,Borel,799570.8"
    "391579,Arnaud,de,1644631.8"
    "368256,Filippo,Carone,1546675.2"
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Microsoft 365 (Subscription)
    Posts
    192

    Re: How to remove quotation marks from my worksheet output ?

    Jeff, that's what humdingaling pointed out. I did not notice that. Thanks for your observation.
    redsab

  6. #6
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Microsoft 365 (Subscription)
    Posts
    192

    Re: How to remove quotation marks from my worksheet output ?

    I came up with a work around myself!
    redsab
    Attached Files Attached Files

+ 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. Replies: 9
    Last Post: 11-27-2013, 02:58 PM
  2. Quotation marks in formula giving wrong output
    By pcfreakshow in forum Excel General
    Replies: 1
    Last Post: 10-11-2012, 03:00 PM
  3. Replies: 0
    Last Post: 11-09-2011, 01:31 AM
  4. Replies: 0
    Last Post: 07-28-2005, 10:05 PM
  5. how do I remove quotation marks from .CSV file
    By Ratty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2005, 11:05 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