|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Pulling down info from a text file
I'm working on an athletic Web site. The roster is created in a word document, unfortunately. I want to take the info in the document and pop the info into a database. Fortunately, the data is set up as a sort of table already, but with tabs and enters seperating the info. So each player is on a line with his/her info following.
So far I've decided it can be done by thinking of the document as a line enter-delimited list. But I'm wondering if there is an easier way to the pull info down. Any thoughts? |
|
#2
|
|||
|
|||
|
No you're probably right, treating the document as a set of carriage return/line feed-delimited list elements, and then treating each of those as a tab-delimited list, is probably the only way you can do it.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Pulling the word Document brings up gobble-de-gook.
I use cffile to get the info. I've set it up with various char sets as well. <cffile action="read" file="#expandPath(path_info&'\'¤t_name)#" variable="roster_list"> But each time, I receive info similar to: ╨╧рб▒с>■ &(■ % ье┴@ Ё┐╢ jbjbqq &ЎЎ╢ lвввввввццццц Єц$ fэээс у у у у у у , к | вэээээ ═вв█═══эvввс ═╢╬ввввэс ══╒ вв╒ ╡о╛ццcj╒ ╒ $ $ ╒ &═&╒ ═├х2005 COLLEGE MEN'S BASKETBALL (1/25/05) No. Name Yr. Po. Ht. Wt. Hometown/ High School 3 Is there a way to pull the text from a Word Document without the mess? |
|
#4
|
|||
|
|||
|
I don't know if there are any functions to treat those formatting headers in word documents, but wouldn't it be possible for you to open the word document and then save it as plain text or excel? Maybe not the most elegant solution, but that way you don't need to filter out the formatting header.
|
|
#5
|
|||
|
|||
|
I'm not the one uploading the file and the person who is is set on using a word doc. Which means I get to compensate for him and try to use the Word Document.
|
|
#6
|
|||
|
|||
|
It's supposed to come up as "gobbledegook". Word documents are binary files. Open a Word document in Notepad and you will see this clearly. So no, there is no easy way that I know of to get at the text unless you start messing with something like Apache POI. You can either have them upload a plain text file, or let them upload a Word document and then let them download that Word document.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Pulling down info from a text file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|