dbTalk Databases Forums  

importing from a web csv

comp.databases.filemaker comp.databases.filemaker


Discuss importing from a web csv in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tomstreet@alltel.net
 
Posts: n/a

Default importing from a web csv - 08-08-2005 , 02:28 PM






I'm new to importing data from a csv file. Here's my scenario; a
teacher submits a web form than contains the names of 10 students. I
get an email of the submission and the records are added to a csv. I
open the csv in Excel delimited with "|." The problem is that each
record in the csv has all 10 names on one row. I need each name to be a
separate record when imported. Thanks for any help.


Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: importing from a web csv - 08-08-2005 , 03:34 PM






tomstreet (AT) alltel (DOT) net wrote:

Quote:
I'm new to importing data from a csv file. Here's my scenario; a
teacher submits a web form than contains the names of 10 students. I
get an email of the submission and the records are added to a csv. I
open the csv in Excel delimited with "|." The problem is that each
record in the csv has all 10 names on one row. I need each name to be a
separate record when imported. Thanks for any help.
Rather strange way of creating a csv, but be that as it may, it has to be
fixed.

FileMaker imports a line as a record. There's nothing you can do to change
that.

As long as you're bringing it into Excel first, transpose it ("Paste
Special") there so that the row becomes a column and vice versa. Then open
it in FileMake,and your problem should be solved.

Matt


Reply With Quote
  #3  
Old   
42
 
Posts: n/a

Default Re: importing from a web csv - 08-08-2005 , 04:05 PM



In article <QlPJe.3165$f.1794@trndny09>, I'm (AT) Witz (DOT) end says...
Quote:
tomstreet (AT) alltel (DOT) net wrote:

I'm new to importing data from a csv file. Here's my scenario; a
teacher submits a web form than contains the names of 10 students. I
get an email of the submission and the records are added to a csv. I
open the csv in Excel delimited with "|." The problem is that each
record in the csv has all 10 names on one row. I need each name to be a
separate record when imported. Thanks for any help.

Rather strange way of creating a csv, but be that as it may, it has to be
fixed.
Doesn't sound like a CSV to me.

There is no official standards for .csv (leading to all sorts of
bastardizations involving quotes, escape characters, debates over
whether you actually need all the commas if the final fields on a line
are blank, etc).

The format really only has 2 rules:

1) Each line is a record
2) Each field is separated by a comma

That's it.

Quote:
FileMaker imports a line as a record. There's nothing you can do to change
that.
See rule #1.

If filemaker allowed you the kind of flexibility you're asking for it
wouldn't be a csv importer, it would be a general purpose text file
parser.

Quote:
As long as you're bringing it into Excel first, transpose it ("Paste
Special") there so that the row becomes a column and vice versa. Then open
it in FileMake,and your problem should be solved.
If its somethign you do regularly I'd write a quick little command line
utility to pre-process the so-called 'csv' into an actual csv. This is
likely to be remarkably easy, and you could probably contract a
programmer to do it in a few hours if you can't do it yourself.

Ideally of course, I'd want to fix the website so that it actually
outputs a csv.

-regards,
Dave


Reply With Quote
  #4  
Old   
Shadenfroh
 
Posts: n/a

Default Re: importing from a web csv - 08-11-2005 , 06:12 AM



I agree with the others that the file is strangely formatted.

If you can't get that changed, though, another option is to bring the data
in "as is", into one or more text fields, and then use a script to parse the
text into the necessary fields.

I have a case, for instance, where users receive emails from their web site
(until we can get them using CWP). They paste the email into a notes field,
then press a button that parses out the values from the notes into the
requisite fields. The button script looks for patterns in the email to find
the first name, last name, address, phone, etc. The following calc, just by
way of example, identifies the line starting with the word "Name" and puts
it into the NameFirst field:

Let ( label = "Name:" ;

Middle (

Leads::A_t_Notes ;

Position ( "¶" & Leads::A_t_Notes ; "¶" & label ; 1 ; 1) + Length ( "¶" &
label ) ;

Position ( Leads::A_t_Notes ; "¶" ; Position ( "¶" & Leads::A_t_Notes ; "¶"
& label ; 1 ; 1) + Length ( "¶" & label ) ; 1 ) -
Position ( "¶" & Leads::A_t_Notes ; "¶" & label ; 1 ; 1) - Length ( "¶" &
label )

)
)

--

Shadenfroh
shadenfroh (AT) yahoo (DOT) com

<tomstreet (AT) alltel (DOT) net> wrote

Quote:
I'm new to importing data from a csv file. Here's my scenario; a
teacher submits a web form than contains the names of 10 students. I
get an email of the submission and the records are added to a csv. I
open the csv in Excel delimited with "|." The problem is that each
record in the csv has all 10 names on one row. I need each name to be a
separate record when imported. Thanks for any help.




Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.