Need to know if the excel fields have commas in them.
i.e. are they text fields.
If they are then List get at will only retrieve until the comma.
----- Original Message -----
From: Kevin Faulkner
To: '[EMAIL PROTECTED]'
Sent: Monday, October 20, 2003 2:29 PM
Subject: [cfmail] RE: [ cf-dev ] Excel parsing
Here we go; let me know if you have any queries/other issues.
Cheers...
<CFTRANSACTION>
<CFFILE ACTION="READ" FILE="#application.fileLoc#/#yourFilename#"
VARIABLE="inFile">
<CFOUTPUT>
<cfloop index="line" list="#inFile#"
delimiters="#CHR(13)##CHR(10)#">
<CFQUERY NAME="addRow"
DATASOURCE="#application.datasource#" DBTYPE="#application.dbtype#">
INSERT INTO YourTable
( yourCol1,yourCol2....)
VALUES
(
(
#listGetAt(line,1,',')#,#listGetAt(line,2,',')# ......)
)
</CFQUERY>
</cfloop>
</CFOUTPUT>
</CFTRANSACTION>
-----Original Message-----
From: Ellwood [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 12:30
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Excel parsing
Excellent. Would be interested to see.
-----Original Message-----
From: Kevin Faulkner [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 11:43
To: '[EMAIL PROTECTED]'
It definately is if you can ensure your input file is a csv, as I said,
can't confirm MS don't overflow it with escape and display characters if
it's an .XLS
But if you're happy with csv's then let me know and I'll be happy to share
an exampole with you. I've done an automated billing script that uses just
this logic, parsing out csv's of over 100,000 rows, so shouldn't be a
problem.
-----Original Message-----
From: Ellwood [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 11:37
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Excel parsing
Hmmm...Is it that simple?
-----Original Message-----
From: Kevin Faulkner [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 11:18
To: '[EMAIL PROTECTED]'
If the EXCEL files could be CSVs , then read the file into memory via CFFILE
then loop thru delimitting with chr(10)chr(13) and do an insert each row.
This may even wotk with .XLS, but .CSV I know works.
-----Original Message-----
From: Ellwood [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 11:16
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] Excel parsing
Does anyone have or know of a good resource for parsing and excel document
in = coldfusion MX and I don't mean displaying it using CFCONTENT. I want to
be able = to import an excel document and then write the columns into their
relevant = columns in an access database. And I want to do all this online
not via import = in Access.
DISCLAIMER: This e-mail is confidential and may also be legally privileged.
If you are not the intended recipient, use of the information contained in
this e-mail (including disclosure, copying or distribution) is prohibited
and may be unlawful. Please inform the sender and delete the message
immediately from your system. This e-mail is attributed to the sender and
may not necessarily reflect the views of the Patsystems Group and no member
of the Patsystems Group accepts any liability for any action taken in
reliance on the contents of this e-mail (other than where it has a legal or
regulatory obligation to do so) or for the consequences of any computer
viruses which may have been transmitted by this e-mail. The Patsystems Group
comprises Patsystems plc and its subsidiary group of companies.
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
DISCLAIMER: This e-mail is confidential and may also be legally privileged.
If you are not the intended recipient, use of the information contained in
this e-mail (including disclosure, copying or distribution) is prohibited
and may be unlawful. Please inform the sender and delete the message
immediately from your system. This e-mail is attributed to the sender and
may not necessarily reflect the views of the Patsystems Group and no member
of the Patsystems Group accepts any liability for any action taken in
reliance on the contents of this e-mail (other than where it has a legal or
regulatory obligation to do so) or for the consequences of any computer
viruses which may have been transmitted by this e-mail. The Patsystems Group
comprises Patsystems plc and its subsidiary group of companies.
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
DISCLAIMER: This e-mail is confidential and may also be legally privileged.
If you are not the intended recipient, use of the information contained in
this e-mail (including disclosure, copying or distribution) is prohibited
and may be unlawful. Please inform the sender and delete the message
immediately from your system. This e-mail is attributed to the sender and
may not necessarily reflect the views of the Patsystems Group and no member
of the Patsystems Group accepts any liability for any action taken in
reliance on the contents of this e-mail (other than where it has a legal or
regulatory obligation to do so) or for the consequences of any computer
viruses which may have been transmitted by this e-mail. The Patsystems Group
comprises Patsystems plc and its subsidiary group of companies.
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]