ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 17th, 2005, 09:16 AM
Bastion Bastion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 181 Bastion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 4 h 23 m 47 sec
Reputation Power: 4
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?

Reply With Quote
  #2  
Old February 17th, 2005, 09:38 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,648 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 12 h 8 m 8 sec
Reputation Power: 53
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

Reply With Quote
  #3  
Old February 22nd, 2005, 08:56 AM
Bastion Bastion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 181 Bastion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 4 h 23 m 47 sec
Reputation Power: 4
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&'\'&current_name)#" variable="roster_list">

But each time, I receive info similar to:

╨╧рб▒с>■  &(■   %                                                                                                                                               ье┴‰@ Ё┐╢ jbjbq”q” &ЎЎ╢      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?

Reply With Quote
  #4  
Old February 23rd, 2005, 03:10 AM
Black Adder Black Adder is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 16 Black Adder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 47 m 27 sec
Reputation Power: 0
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.

Reply With Quote
  #5  
Old February 23rd, 2005, 07:35 AM
Bastion Bastion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 181 Bastion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 4 h 23 m 47 sec
Reputation Power: 4
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.

Reply With Quote
  #6  
Old February 23rd, 2005, 08:13 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,648 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 12 h 8 m 8 sec
Reputation Power: 53
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Pulling down info from a text file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway