+ Reply to Thread
Results 1 to 3 of 3

Inport and format a very large .csv file

  1. #1
    Registered User
    Join Date
    03-09-2006
    Location
    Australia
    Posts
    80

    Inport and format a very large .csv file

    I am stuck trying to resolve an issue that I perceive to be a problem that could be solved with a macro.

    I need to alter the format of a.txt file in Excel so that it can be inported into another program (Surpac).

    The .txt file needs to be imported into Excel, where it will come in as a single row .csv import.
    The .txt file is over 1gb in size, so the method I would normally use in excel isn’t adequate as there aren’t enough columns/rows to place the data in excel.

    The change that I need to make is to import the large file into Excel as a manageable .csv (can it be split up?) and then change the single row of data into rows of three columns.

    So basically I need to take the first three values that are seperated by commas and insert them into seperate columns, then the next three values on another row into the same columns and repeat until all values are included.

    I have attached a (small) sample of the file I need to repair labelled "errant data" and a sample of what I need to achieve, "corrected data".

    Any suggestions would be appreciated.

    correct data.txterrant data.txt

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Inport and format a very large .csv file

    hi AussieExcelUser, a bit of Googling and here is the option to split it to a chunks of any size you want. Link: http://www.freewaregenius.com/how-to...of-lines-rows/
    As soon as it is done the result you want can be achieved using VB and Excel

  3. #3
    Registered User
    Join Date
    03-09-2006
    Location
    Australia
    Posts
    80

    Re: Inport and format a very large .csv file

    Thanks very much for the assistance Watersev, GSplit worked a treat. All files now split imported and saved, I ended up with just under 37 million rows with 3 columns of data!

+ 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. Best file format for large file
    By conorsgaffney in forum Excel General
    Replies: 1
    Last Post: 09-13-2010, 08:24 PM
  2. Replies: 3
    Last Post: 11-09-2009, 01:33 PM
  3. [SOLVED] Loosing value of large number when saving file to CSV format
    By Kim Luu in forum Excel General
    Replies: 2
    Last Post: 05-01-2006, 09:45 AM
  4. Inport from a variable file name
    By shikamikamoomoo in forum Excel General
    Replies: 1
    Last Post: 03-21-2006, 08:29 PM
  5. inport txt file automatically
    By delmac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2005, 08: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