Help With Database Export

braindead
11-01-2000, 04:56 AM
Hi.
I have a database frontend connecting to a Acces97 database using ADO. Everything runs fine. However, my users have come up with a requirement of exporting records into excel.
The help I need is :
Please point me in the correct direction to do this. Can I only do so by creating a BIFF file or do I have to use the Excel.8 Reference? Or.. Hopefully, there is an easier way to do this....

Please Help.

whelanp
11-01-2000, 08:25 AM
There are a number of ways of doing this depending your knowledge of VB and exactly where it will be executing from.

You state that your using a database front end, is this and Access App containing no tables or do you mean VB.

If Access then check out the TransferSpreadsheet function, its very easy to use.

If your using VB then the best way to export to Excel to to connect to Excel using ADO and treat it like a normal datasource.

Finally there is the Excel Object Library, this allows you to use Excel from Access/VB via Automation. I've always found this to be quite time consuming when the spreadsheet is fairly complex and it means a lot of code.

Your best bet would be the 2nd method but ADO(ing) directly to Excel is the most future proof (and slickist).

braindead
11-01-2000, 01:13 PM
Thanks for replying.
I am using VB as a front end to connect to an Access97 database.

I've never tried connecting to an Excel Data Store before. Only Jet & MSSQL. What Provider do I use??

eg. For Connection String to Access would look like :
Dim conn As New ADODB.Connection

conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=database.mdb"
conn.Open

How does an Excel Connection String look like?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum