How can I import a text file into excel then format the data easily?

Hello all!

I orginally had a horrible pdf file with a bunch of tables and information on it.  As seen in the standard pdf picture

I then used PDFZilla to convert the pdf to a text file. The output can be seen in sampletext.


Then this is where my problem is...


when ever i try to import the text file into excel, I have lots of trouble to get it to format correctly. I try text to columns but i cant get it to separate the numbers correctly.


I don't care about the column headers, but I do need the row data to be separate so that I can write a macro to extract the data and then copy it to another workboook.


Please help! I hope that I have provided enough explanation.
Standard-Pdf.png
SampleText.txt
jtovar3Asked:
Who is Participating?
 
shahzadbuxConnect With a Mentor Commented:
Agree with rspahitz - no separators means looking at the txt file you cant tell where one number begins and the next starts.

Have you tried to select all in the pdf then copy\paste into excel - anything half useful? could then work with it and pull out the info in an acceptable format..
0
 
Richard2k4Commented:
if it was me, I would write a script in Powershell or VB to parse the text and seperate the words from the numbers section...then i would import only the numbers as space delimited.   Insert a blank column and then paste in the word sections
0
 
rspahitzCommented:
Have you looked at the text file that gets created?  There are no separators.
I've seen that a lot when copying pdf files and consider it a problem with the automation mechanism used to examine the document.
Anyway, it seems that your PDFZilla tool is not working on that pdf document.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jtovar3Author Commented:
actually the copy and paste actually didnt work out too bad... surprisingly.

do you have any tips on writing a script to automatically open a pdf, copy all, then paste into excel?

I also need to work on a code to find specific sets of data then transfer them to a separate spreadsheet, but i think i should separate that into a different question thread
0
 
shahzadbuxCommented:
Hmm...only way I know off the top of my head is to use AutoIT, maybe a vb script?

Anyone else have another suggestion?
0
 
rspahitzCommented:
I tried it by adding a pdf reference to VBA and opened the pdf and it was excessively complicated to interpret because of the way pdfs are created.  Much easier to copy/paste by hand.
0
 
redmondbCommented:
rspahitz,

Do you have an OCR program?

For example, I have used ABBYY FineReader a lot for converting PDF's and TIFF's to text. This particular OCR (can't speak for others, obviously) recognises when the text is available uses that, bypassing any actual character recognition.

Regards,
Brian.

0
 
rspahitzCommented:
B, I don't think that comment was meant for me.  I haven't had an OCR program in about 10 years and really don't use one, but it sounds useful for pdf interpretations.
0
 
redmondbCommented:
Apologies, rspahitz!
0
 
andymacfCommented:
We have the full version of Adobe Acrobat Pro, this allows you to convert the pdf, and then you can copy and paste directly from it to excel/word. Quite a worthwhile tool.
0
 
redmondbCommented:
andymacf,

Thanks.

Presumably you had tried that before using PDFZilla?

Regards,
Brian.
0
 
andymacfCommented:
Brian
I have looked at PDFZilla and I don't think it will work in this scenario.  What jtovar3 needs is something that will convert the pdf to a csv file. I found this, it might work.

1.      Open the desired PDF document in Acrobat Standard or Professional.
2.      Select "Export" under "File" and choose "Text." Some versions of Acrobat include options for "Text (accessible)" and "Text (plain);" choose "Text (accessible)" to preserve basic formatting.
3.      Type the file name for the converted document and click the "Save" button. Acrobat saves text files as tab-delimited files.
4.    Launch the spreadsheet application (such as Microsoft Excel or OpenOffice Calc) and select "Open" under "File" in the top menu bar.
5.      Select the text file created in Step 3 and click the "Open" button to launch an Import Wizard.
6.      Review the pages in the Import Wizard to select how the data is organized in columns and click the "Next" button to navigate through the wizard. For example, select "Delimited" to specify fields and click the option next to "Space" or "Comma" to specify how the fields are separated.
7.      Click the "Finish" button.
8.      Select the "Save As" function (usually under "File" in the top menu bar) and select the file type as "CSV (Comma-Separated Values)." Select "CSV (Windows)" instead of "CSV (MS-DOS)" if this option is displayed.
9.      Click the "Save" button.

http://www.ehow.com/how_5816209_convert-pdf-csv.html
0
 
redmondbCommented:
andymacf,

Please read my last post again - I was querying why he was using PDFZilla when he has Adobe Acrobat Pro!

Cheers,
Brian.
0
 
jtovar3Author Commented:
I'll post another question about scripts to open adobe and copy and paste.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.