+ Reply to Thread
Results 1 to 8 of 8

Opening Text File Delimited Carat(^) separator

  1. #1
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Opening Text File Delimited Carat(^) separator

    Hello,

    i have 1000 of text files and want to open one by one
    when text file open i am picking 2 columns(G, K) data in sheet1 columns (A and B)
    after that i close the opened text file and open new one.

    but i stuck in opening the text file with carat separator (^)
    Please see the my below code:

    Please Login or Register  to view this content.
    Please suggest the code
    Last edited by mohan.r1980; 10-09-2017 at 04:07 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Opening Text File Delimited Carat(^) separator

    It depends on the structure of your ext file.

    One way is that you could create Schema.ini file in the folder and read through ADO something like "Format=(^)".
    Otherwise, read the contents and split the output...

  3. #3
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Opening Text File Delimited Carat(^) separator

    hi sir,
    actually text file format is very simple
    below is the contain of text file.

    Please Login or Register  to view this content.
    and in this case i have to pick the G2:G & end and K2:K & end data and paste sheet1 so there is no need to split the data.
    below are the steps which i follow
    steps:
    open text file
    copy 2 columns and paste in sheet1
    close text file
    open new one
    copy 2 columns and paste in sheet1 (leave 1 row and then paste)
    loop so on

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Opening Text File Delimited Carat(^) separator

    Quote Originally Posted by mohan.r1980 View Post
    but i stuck in opening the text file with carat separator (^)
    Isn't that your problem?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Opening Text File Delimited Carat(^) separator

    Not really sure though
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Opening Text File Delimited Carat(^) separator

    Thanks Jindon Sir,

    i just want to know the parameter of carat separator

    i trried
    Please Login or Register  to view this content.
    but you show me the right parameter
    i.e.
    Please Login or Register  to view this content.
    it open the text file but in general form not in text form. its ok i will make it as text

    thanks again sir.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Opening Text File Delimited Carat(^) separator

    If you use "Workbooks.OpenText", it opens through Excel, not by a text editor.
    Do you want to read it sequentially, seemlessly?

    If so, my first reply.

  8. #8
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Opening Text File Delimited Carat(^) separator

    Hi Sir,

    i record the macro and get the syntax it looks like below:

    Please Login or Register  to view this content.
    it works

    thank you sir

+ 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. [SOLVED] Import Text file with more than one text separator to excel
    By bennyys in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-13-2017, 11:25 PM
  2. [SOLVED] Export to the text file with space separator
    By mgecelov in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-07-2017, 11:31 AM
  3. Convert Columns to text file with a separator of |
    By Mquattrone in forum Excel General
    Replies: 8
    Last Post: 08-14-2014, 11:14 PM
  4. [SOLVED] Opening a Text File (Tab Delimited)
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2012, 11:00 AM
  5. Opening a space delimited text file in Excel
    By c_mei83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2009, 02:00 AM
  6. Saving multi-tab excel file created from comma delimited text file
    By Marcus Aurelius in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2005, 01:20 PM
  7. Replies: 0
    Last Post: 03-08-2005, 11:06 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