Excel – How to embed or link a text file in Excel

embeddinglinksmicrosoft excelmicrosoft-excel-2010ole

I have a text file containing a memory dump from an embedded system, which I update after every run (the file is formatted in the Motorola SREC format, but this is not too important). I am using Excel to parse the file to meaningful values and verify the results.

Currently, I open the file in a text editor, select all, copy, then paste into a specified area in the spreadsheet. The formulas in the spreadsheet take care of the rest.

I want to skip the stage of the text editor. What I would like to have is a way to embed (or, more correctly, link) the file contents in the specified cell(s), and let Excel update the fields automatically when the dump file changes (or, at least, update upon a key-press).

Is there a way to do that?

Note: I know it can also be done with Data/Get External Data/From File, but this is not an automatic process either.

Best Answer

After some further Googling with a more exact search phrase, I found this link which points to the answer.

  1. Select the cell where the first line of text from the file should be.

  2. Use the Data/Get External Data/From File dialog to select the text file to import.

  3. Format the imported text as required.

  4. In the Import Data dialog that opens, click on Properties...

  5. Uncheck the Prompt for file name on refresh box.

  6. Whenever the external file changes, click the Data/Get External Data/Refresh All button.

Related Question