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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old September 8th, 2003, 10:48 AM
cfbeginer cfbeginer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 cfbeginer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
getting data from excel

Is it possible to get data from an excel spreadsheet and display it in a browser using coldfusion?
If yes, can anybody tell me how to do it?
thanks

Reply With Quote
  #2  
Old September 17th, 2003, 06:24 AM
KevinH KevinH is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: US
Posts: 5 KevinH User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The way we do it is CFFILE the excel to some directory on your webserver (use makeunique option), then use CFHTTP to link the content to have your user validate their upload. Once that is done, then you can save your content out to your database.

Good luck!

Reply With Quote
  #3  
Old September 17th, 2003, 09:30 AM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 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 3 Days 17 h 7 m 51 sec
Reputation Power: 42
You can actually query the Excel spreadsheed just like you would query a database. In CF 5 there should be an option of 'Excel' when you define a data source. In CFMX since it uses JDBC you must first create a system ODBC connection, then in CFMX set it up as an ODBC bridge connection. One that is in place you can query the excel file like this:

<cfquery name="queryname" datasource="excelDSN">
select * from `sheet1$`
</cfquery>

A quirky thing is that the quotes around the sheet name MUST BE LIKE THIS: ` and NOT LIKE THIS: '

But it does work. Hope that helps.

Reply With Quote
  #4  
Old September 29th, 2003, 08:19 AM
neus neus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: MOV @R1, P1 ; RAM (40H) <= OCAH
Posts: 18 neus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can also do it using COM ... CFComet has a lot of good resources for that ..

Check this one http://www.cfcomet.com/Excel/index....3E9004033E03EF9

Reply With Quote
  #5  
Old September 29th, 2003, 09:22 AM
Demarco Demarco is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 18 Demarco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
why would you want to do that
when you can use a cf dsn ??

Reply With Quote
  #6  
Old September 29th, 2003, 09:38 AM
neus neus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: MOV @R1, P1 ; RAM (40H) <= OCAH
Posts: 18 neus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
In two simple words .. raw power.

You can use a odbc conection, but you are tied up to the drivers and to what they support.

If you use a COM object to access the Excell datasheet you hv to your disposal all the Excell API. Like i said, it's just a option. But i recommend to use it only if you want to have such power in your hands. Why ?
  1. You have to access it through COM .. and that's not even close to fast. You'll use JIntegra for that and create a com2java/java2com bridge, wich like i said it's not very fast and/or stable
  2. You'll hv to search Micorosft/s MSDN Library to find some docs to know the Excell API
  3. Bloody more complicated


I never said you couldn't use a odbc source to the the work, all i said was that COM was an option, and options are never too many !

regards,
idss

Reply With Quote
  #7  
Old September 29th, 2003, 09:45 AM
Demarco Demarco is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 18 Demarco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Fair point
but tbh how many times in any application have you found that cf's odbc drivers or even jdbc drivers in mx didnt do what you mostly required ?

- One thing to note this really is only an option if you have access to the server & cfadmin ( ie not a shared hosting option )

but yes its a valid option if you have access to the server

Reply With Quote
  #8  
Old September 29th, 2003, 09:54 AM
neus neus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: MOV @R1, P1 ; RAM (40H) <= OCAH
Posts: 18 neus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Macromedia uses 3rd party drivers ( ODBC - Merant | Jet- infoZoom[ jadoZoom] ) , and some of them don't support all the things i sometimes have to use .. right now is appening that ... :\

It's not very usual .. but it appens

As for the cfadmin access, you don't need to hv access to it .. unless createObject() is disabled :\

but you're right ... using COM is not the best answer .. and it wil never be ! cause it's slow like hell and very unstable

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > getting data from excel


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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