Skip to main content
Inspiring
June 13, 2010
Question

Import Data from XLS into Database

  • June 13, 2010
  • 2 replies
  • 1460 views

I am trying to create a schedule importer in Cold Fusion - where a league can do their schedule in XLS first, then import it into the database.

www.slopitchleagues.com - there is an automatic system they can use - but have to enter them manually...

So I've had a request to do it with an XLS file...

An example of the XLS fields required are below...

Basically starting on the 6th row (instructions on prior rows)

And importing till last row...

Home Team IDAway Team IDField IDDateTimeLeague ID
5481543526-Jul-106:00 PM128
1545483526-Jul-107:30 PM128
5615363527-Jul-106:00 PM128
5365613527-Jul-107:30 PM128
5485323528-Jul-106:00 PM128
5325483528-Jul-107:30 PM128


Thoughts...

This topic has been closed for replies.

2 replies

Inspiring
June 14, 2010

Some options:

1. Use CFSPREADSHEET.  Allow users to upload an xls file which is then read by CFSPREADSHEET.  The data from the resulting query object can then be inserted into your database.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec17cba-7f87.html

2.  Use your database's import tools, if any.  If your database supports importing data from xls you could let your users upload an xls file.  Then use the database's import features to import the data from the spreadsheet.   What database are you using?

Either of the options above would use CFFILE to allow the user to upload files to the server.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-738f.html

Inspiring
June 14, 2010

Will look into...

I am using MS Access

Inspiring
June 13, 2010

Let them copy and paste it into a textarea.  You'll end up with tab delimited data.