Parsing a word document into a csv or other machine readable format

Copper Contributor

Hi all,

I have a non-delimited text file of health data called "2014_data.txt". This text file doesn't have any structure to it and the only way to structure it into columns and rows is to use the specified fixed length positions for each variable as indicated by the data dictionary "UserGuide2014_sample.docx".

So basically I would like to transfer each variable's character fixed positions (e.g. variable MAGER is characters 75-76) into a csv or machine-readable format. All of the other information about the variable I don't really care.

I want "UserGuide2014_sample.docx" -> properly formatted csv (it's ok if it's not PERFECT, I can always do manually edits, but as long as it takes some of the work out of it, because I have many files like this)

Many thanks,
David

1 Reply

@dal2111 

Assuming your Excel is with Power Query, on ribbon Data->From Text/CSV->select your file.

First screen will be as

image.png

After that you may click on Transform to make adjustments or Load directly to Excel sheet.