[AccessD] Connecting To Excel via Code (module)

Drew Wutka DWUTKA at marlow.com
Mon Nov 3 11:04:44 CST 2003


Use ADO.  It will let you treat Excel just like any other recordset.  

Drew

-----Original Message-----
From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net]
Sent: Monday, November 03, 2003 9:18 AM
To: accessd
Subject: [AccessD] Connecting To Excel via Code (module)


To all,
We are operating Office XP Professional and I have started to write a little
scheduling application.  Every so often we will have an Excel Workbook
containing three spreadsheets, what I need to be able to do is link into the
Workbook to bring a certain clients data in from the second sheet.
The fields in the workbook are as follows:
StoreNo, HolidayWeek, Sun, Mon, Tue, Wed, Thur, Fri, Sat
StoreNo contain the store number and if there is a certain week that we
cannot go to the store the week commencing date wil be entered under
HolidayWeek.  If there is a certain day or multiple days that we cannot go
to the store, the individual dates will be stored under the day of the week.
Now I have a tbale with the following fields :
StoreNo, BlackoutWeek, BlackoutDay
I need to link into Excel and bring the data in from the Excel spreadsheet
into the table above.
So I may end up with
StoreNo            BlackoutWeek             BlackoutDay
1                                                              27/01/04
1                                                              28/01/04
1                          04/01/04
etc, has anyone any sample code on how to link into the Excel spreadsheet an
retrieve the data.
Thanks in advance for any help.
Paul Hartland
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list