Upload XLS File, Loop through rows query a DB
what enable user upload excel spreadsheet 1 column , many row of ip's. put ips in list or array , loop through list , query table ips match list.
any appreciated.
any appreciated.
we have similar apps except that, instead of uploading file, users copy , paste column text area. this:
<!--- first, replace carraige returns (chr(13)) , line feeds (char(10)) commas --->
<cfset hscnumbers=replace(form.hscnumbers,chr(13)&chr(10),",","all")>
<!--- remove last comma, if commas exist (there may 1 hsc number) --->
<cfif find(",", hscnumbers) gt 0 , right(hscnumbers, 1) ",">
<cfset hscnumbers = left(hscnumbers, len(hscnumbers) - 1)>
</cfif>
and have list send db.
<!--- first, replace carraige returns (chr(13)) , line feeds (char(10)) commas --->
<cfset hscnumbers=replace(form.hscnumbers,chr(13)&chr(10),",","all")>
<!--- remove last comma, if commas exist (there may 1 hsc number) --->
<cfif find(",", hscnumbers) gt 0 , right(hscnumbers, 1) ",">
<cfset hscnumbers = left(hscnumbers, len(hscnumbers) - 1)>
</cfif>
and have list send db.
More discussions in Database Access
adobe
Comments
Post a Comment