catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Scripting Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 15-01-2008, 09:50 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2004
Posts: 34
Linking to Excel from ASP

Hi all

Anyone got a duffer's guide to retrieving Excel data into a SQL database using classic ASP? I've tried a few connectuion strings but am struggling. (I can provide details of what I've tried if you like!).

I'm developing on a Vista machine with Office 2007, so I'm not sure if this has any bearing on things? Will the finished result (hosted on Catalyst2 servers) have to be any different?

Cheers
Alan
AlShack is offline   Reply With Quote
Old 16-01-2008, 10:00 AM   #2 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
Join Date: Oct 2003
Posts: 1,484
It is possible using Jet Connection. Which then allows you to query the sheet using normal sql. I have a solution using the following connection string:

Code:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=File.xls;Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1
I have this working for the old excel format. In theory the new 2007 excel format can be queried by the use of XML but not something I've tried as of yet.

It's been a year or two since I wrote my code so my memory is a bit fuzzy. But I know that I can't test the above code on my dev machine (Vista x64). I'm not sure if its the 64bit or the OS that causes the problem. I suspect it's either the former or both.

I would recommend your first port of call would be to see if you have Jet installed.

HTH

Jas
__________________
Jason Robbins
jason@catalyst2.com
WhiskyFudge is offline   Reply With Quote
Old 16-01-2008, 12:46 PM   #3 (permalink)
Registered User
 
Join Date: Jul 2004
Posts: 34
Excellent - ta Jas.

It works on the Catalyst2 servers, but not on my laptop so I guess I'll be developing it 'live'!

Cheers
Alan
AlShack is offline   Reply With Quote
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.