+ Reply to Thread
Results 1 to 5 of 5

recommended method to analyze text file

  1. #1
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    recommended method to analyze text file

    Hello,

    I have a pdf which I copied and save as txt file.
    I wish to analyze this file.
    The file contains multiple rows. Most of the begins with: "filed name:" and after that there is one value or multiple values.
    If there is one value I should find a way to get the string after the filed name till end of line.
    If there are multiple values I should split it.

    What is the recommended data structure to store the file in memory in order to analyze it ?

    Thank you for your help

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: recommended method to analyze text file

    Hi

    is your question about storing the data, or how to split the data in the rows into separate columns?

    If you want to spit the data, it will depend on how the values are separated

    if by a comma or semicolon, you can use the:

    data > text to columns > delimited

    commands to split the data

    (hint: search and replace "field name:" with "field name:;" first to split the label from the first value)
    Last edited by NickyC; 08-10-2012 at 01:39 AM.

  3. #3
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: recommended method to analyze text file

    Hello,

    Thank you for your answer and hint. I will be useful for me.
    I am sure what is the best data structure to store the text file.
    I need a data structure in which I can store the data by rows and search a string in it.
    I think that data structure will work faster than worksheet.

    What do you think ?

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: recommended method to analyze text file

    If your data is in a plain text file - which is likely, if you have written it from a PDF - then you are going to have to transform the data in some way if you want to sort by columns (e.g. particular fields). It depends on your type of data, but I would do that in Excel - splitting particular fields like the texttocolumns function and creating tables and queries is very easy in excel. If your files are very large and long, however, that will create a large excel file. Text is one of he least memory-hungry ways of storing data.

    Alternatively, depending on the way your PDF file was created and how the data is presented, and on your PDF reader, you may be able to copy and paste data directly into excel in table format, which will preserve rows and columns

  5. #5
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: recommended method to analyze text file

    Thank you for your answer. I will try to do it in excel. Is it safe to use to use send keys for copy & paste pdf content ?
    Export to plain text does not include header text.

    Thank you

+ Reply to Thread

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