Results 1 to 3 of 3

Importing multiple text files into Excel, for a complete beginner

Threaded View

halldin Importing multiple text files... 06-28-2013, 12:47 PM
halldin Re: Importing multiple text... 06-28-2013, 01:39 PM
halldin Re: Importing multiple text... 06-30-2013, 07:52 AM
  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    Gotlagotgo
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Importing multiple text files into Excel, for a complete beginner

    Hi,

    I stumbled upon this forum while searching for a solution to the problem I have, but I've not been successful in applying the suggestions offered in similar threads. I hope someone has the time and interest to help me with this. Here goes:

    I have a couple of hundreds of text files with a defined structure.

    The first set is called sfp-1.txt, sfp-2.txt, ..., sfp-n.txt.

    The content of the sfp files looks like this (although I've shortened it down here for readability):

    0.88720 	 1. 	1
    0.88540 	 1000. 	1
    0.89372 	 2000. 	1
    0.90624 	 3000. 	1
    0.92170 	 4000. 	1
    0.92562 	 4250. 	1
    0.92923 	 4500. 	1
    0.93241 	 4750. 	1
    0.93526 	 5000. 	1
    The second set is called react-1.txt, react-2.txt, ..., react-n.txt. The content of the react files looks like this (again, shortened down):

    1.22834		700		3		0
    1.20069		700		3		1
    1.19880		700		3		250
    1.19979		700		3		500
    1.20259		700		3		750
    1.20632		700		3		1000
    1.21060		700		3		1250
    1.21540		700		3		1500
    1.22038		700		3		1750
    1.22576		700		3		2000
    1.23137		700		3		2250
    1.23721		700		3		2500
    1.24334		700		3		2750

    I would like to be able to import this data into separate sheets. In the case of sfp, it would be good if the first column of values (starting with 0.88720 in the example above) could be placed in, say, column A with a title of "k" in cell A1. The second column of values could be placed in column B with a title of "b". The third column is not so important, it just corresponds to the sfp-number.

    For the react files, mainly the first and fourth column are interesting. The values in the first and fourth column of react corresponds to the first and second columns in sfp.

    Furthermore, sfp-1 is related to react-1, and so on. It would therefore be nice to have for example the sfp columns in column A and B (as stated above), and column one and four of react in column D and E. The data of sfp-1 and react-1 could then be placed in one sheet (for simplicity just "sheet1"), then sfp-2 and react-2 in a second sheet, and so on for all the files (at the moment nearly 300*2).

    I would be grateful for any help with the above, but I would be even more grateful if someone could futhermore suggest a way to automatically plot these data. The "k" values (column A and D as suggested above) should be plotted against the "b" values (column B and E as suggested above).

    Thanks a lot in advance.
    Last edited by halldin; 06-28-2013 at 12:49 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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