|
|

[an error occurred while processing this directive]
|
 |
 |
 |
ODBC configuration |
 |
 |
 |
|
The
first step is to set up an ODBC connection to your data source: the Excel .xls
spreadsheet file.
- Open
the Control Panel and select ODBC Data Sources.
- Select
System DSN, then the Add _ button.
- Select
the Microsoft Excel Driver (*.xls).
- Press
the Finish button.
Give
your Data Source a name and press the Select Workbook_ button
(see below). Select the name of the
Excel spreadsheet that you want to use, and then press OK.
(In this example, the spreadsheet is ISPTelephone.)Your ODBC Excel
Data Source is now complete.
|
 |
 |
create the xCommerce connection |
 |
 |
 |
|
Since
our Excel spreadsheet is now an ODBC data source, we can "connect" to
it from xCommerce. To do this, we create a JDBC Connection Resource that
associates our JDBC driver with the appropriate JDBC URL.
The
setup procedure is very simple. Open xCommerce and choose File | New xObject
| Resource | Connection from the menu.
Give the connection a name on the Header Info panel.
Fill in the Connection Info panel as show below:
|
 |
 |
Excel spreadsheet requirements |
 |
 |
 |
|
For
practical purposes the Excel spreadsheet can be thought of as the database.
Tables are defined for an Excel spreadsheet by naming a range of cells.
So before you can use an Excel spreadsheet as an ODBC data source you
need to ensure that your spreadsheet has named ranges defined.
You accomplish this by selecting a range of cells then select Insert |
Name | Define and enter the name you want to use.
You can name more than one range.
The
screen shot below shows an Excel spreadsheet with a selected group of cells
named AllNumbers. Notice the
values in row 1 (City, State, Telephone, etc). Since they are the first row in the range these values will
be the names of the columns.
|
 |
 |
create the xCommerce JDBC component |
 |
 |
 |
|
|
 |
|
 |
 |
 |