Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default From Excel 97 Programmatically create access 97 or 2000 database and export data to.

From Excel 97 Programmatically create access 97 or 2000 database and
export data to.

Ref. Access 97 or 2000, Excel 97.


I have an excel workbook "Abc.xls".
"Abc.xls" has a variable number of sheets,
in this example has "Sheet135","Sheet147","Sheet085".

In each sheet there are a variable number of columns,
Each column rappresent a field, the text in the first cell is the name
of the field.


I would like to have a macro that from excel workbook like from
"abc.xls",
creates an access 97 or access 2000 database, with the following
details.


database path = active workbook path
database name = excel workbook name ("abc.xls = abc.mdb")
table name = sheets name (a table for each sheet : "Engine Parts",
"Friends", "Clients")
field name = first cell text of each column


like this ...


from an Excel workbook like this ....

"Abc.xls"

Sheet "Engine Parts"
' A B C
-'---------------------------
1' NAME PART CODE
2' O D F
3' Y T Y
4' E W X
5' Q H J

Sheet "Friends"
' A B
-'---------------------
1' NAME ADDRESS
2' A A
3' R 2
4' R W
5' Q 1

Sheet "Clients"
' A B C
-'---------------------------
1' NAME ADDRESS PHONE
2' T D F
3' U Y 5
4' 8 W T
5' Q H P



I woul get an access database like this


Database = "abc.mdb"
Table 1 = "Engine Parts"
field1 = "Name"
field2 = "Part"
field3 = "Code"

Table 2 = "Friends"
field1 = "Name"
field2 = "Address"

Table 3 = "Clients"
field1 = "Name"
field2 = "Address"
field3 = "Phone"


(containing also values, not only tables and fields)
any Help ?

Thanks.
Robert.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 query from Access 2000 database Loretta Cahill Excel Worksheet Functions 1 March 1st 10 04:33 PM
how do i access template database tool as in excel 2000 in 2003 Joe Excel Discussion (Misc queries) 3 October 21st 06 02:42 AM
VBA Code to create PIVOT in Excel from access database ST Excel Discussion (Misc queries) 1 July 26th 06 06:38 PM
Access 2000: Print Database name in Report footer Jeff[_43_] Excel Programming 1 December 10th 04 08:46 PM
Create macro to download access 2000 table to excel 2000 spreadsheet Tushar[_2_] Excel Programming 3 October 21st 04 02:44 PM


All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"