+ Reply to Thread
Results 1 to 4 of 4

Importing a .txt file with quotation marks and carriage returns

  1. #1
    Registered User
    Join Date
    11-21-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office365
    Posts
    3

    Importing a .txt file with quotation marks and carriage returns

    Hi,

    I am trying to import a comma-separated .txt file which looks like this:

    Heading1, Heading2, Heading3... More headings
    "Data 1", "Data 2", "Data 3",.....more data

    Each row ending is marked with a carriage return, but there are lots of carriage returns in the data eg within "Data 1" which do not mark a row ending.
    Every cell of data is enclosed in the quotation marks

    Any advice will be greatly appreciated.

    Brad

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Importing a .txt file with quotation marks and carriage returns

    Hi and welcome
    Could you please explain what you are trying to achieve (I can't seem to find a question in your post), and perhaps post the text file so we can play with it?
    Thanks

  3. #3
    Registered User
    Join Date
    11-21-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office365
    Posts
    3

    Re: Importing a .txt file with quotation marks and carriage returns

    Hi,

    I'm trying to achieve importing a .txt file into an excel spreadsheet. I can delete all quotation marks and delete all carriage returns but think I need to delete all carriage returns within quotatation marks and keep those carriage returns which mark the end of a row. I have not been able to achieve this with the import wizard. The dataset is very large and has confidential information but here is an edited sample of the headings and first row of data:

    "MRN","Surname","DOB","EDB","Parity","Gestation Weeks","Gestation Days","Fetus Number","Contractions","Accelerations","Baseline Rate","Variability Range","Decelerations","CTG Classification","Type of Review"
    "111111","SMITH","06-Apr-1988","24-Nov-2018","0","39","3","19-Nov-2018 16:37: Singleton
    19-Nov-2018 17:03: Singleton
    20-Nov-2018 01:50: Singleton
    20-Nov-2018 13:51: Singleton","19-Nov-2018 16:37: Nil
    19-Nov-2018 17:03: Nil","19-Nov-2018 16:37: Present
    19-Nov-2018 17:03: Present","19-Nov-2018 16:37: 120 bpm
    19-Nov-2018 17:03: 120 bpm","19-Nov-2018 16:37: ?5bpm
    19-Nov-2018 17:03: ?5bpm","""19-Nov-2018 16:37: None
    19-Nov-2018 17:03: None
    20-Nov-2018 01:50: None""","19-Nov-2018 16:37: CTG Reassuring
    19-Nov-2018 17:03: CTG Reassuring","19-Nov-2018 16:37: Antenatal CTG
    19-Nov-2018 17:03: Antenatal CTG"

  4. #4
    Registered User
    Join Date
    11-21-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office365
    Posts
    3

    Re: Importing a .txt file with quotation marks and carriage returns

    Hi All,

    I think I have solved my own problem by cutting and pasting into word, using a series of 'find and replace' functions in word and then cutting and pasting back into notepad and importing into Excel. I'm thinking my problem was unusual so haven't posted more details but happy to if anyone really wants to know.
    BW
    Brad

+ 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. VBA macro > csv file data are with quotation marks
    By delewar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-29-2018, 05:34 PM
  2. [SOLVED] VBA to replace quotation marks in .txt file from Excel
    By shaspos60 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-13-2017, 04:22 AM
  3. Remove quotation marks frm a file
    By IonutC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2017, 12:38 PM
  4. Replies: 0
    Last Post: 11-09-2011, 01:31 AM
  5. [SOLVED] Removing quotation marks in a txt-file
    By Reedhill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 03:20 PM
  6. CSV File and Maintaining Quotation Marks in TXT
    By rammstein in forum Excel General
    Replies: 0
    Last Post: 02-23-2006, 06:18 PM
  7. [SOLVED] 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

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