This is the readme file for the ExcelWorksheetAccessor Bean Suite's demo
------------------------------------------------------------------------

Note: There are two demos, ExcelCellDemo and ExcelDemo in this package. 
      ExcelCellDemo is a simple application that demonstrates how a single 
      cells value can be accessed from a workbook. This demo uses the 
      ExcelCell and ExcelWorkbook beans.
      ExcelDemo is a much bigger application that demonstrates how a 
      range can be accessed. This demo uses the ExcelRange and ExcelWorkbook
      beans.

Sample XLS files
----------------

Some sample .xls files are provided in the "excelfiles" directory under
"demo" directory. If you have Excel 97 installed on your system,
use the file "sample97.xls". For Excel v5.0, use the file 
"sample95.xls". (Note: Excel v5.0 supports only 8.3 file name formats,
i.e. DOS file names. For this reason, copy "sample95.xls" to a 
suitable directory before using it).


1. ExcelCellDemo
----------------
What does this demo show?
-------------------------

This is a simple demo that lets the user read/write the value property of
cell in an excel workbook. The workbook name and the range/sheet name are
customized at design time.


How to run the demo?
--------------------

First, make sure the ExcelWorksheetAccessor Suite of Beans is properly
installed. For information on installing the ExceWorksheetlAccessor 
Suite of Beans, refer to the installation instructions in the Bean 
User's Guide.

Change to the "demo" directory under the "excelaccessor" directory.
Type "java runExcelCellDemo" at the command prompt.

The demo shows the value of the cell 'A1' on sheet 'sheet1' from the file
'excelfiles\sample97.xls'. The Label 'File Name' displays the name of
the file that is being used.

If you are running the demo from within the VA Java IDE (or if you have
Excel v5.0) then the property workbookName on the ExcelWorkbook bean will 
have to be customized accordingly.

You can change the value in the text-field. Pressing the "Update File"
button will write the new value to the XLS file.


Wiring the demo in VA Java
--------------------------

1. Create a class that derives from java.awt.Frame. Drop a Label, TextField
and Button on the Frame.

2. Drop an ExcelCell bean and ExcelWorkbook bean on the design surface.

3. Connect the 'this' property of the ExcelWorkbook bean to the 'xlWorkbook' 
property of the ExcelCell bean.

4. Connect the 'windowOpened' event of the Frame to the method 'initCell' of 
the ExcelCell bean.

5. Set the 'enabled' property of the Button (update button) to 'False' 
(this is an expert feature). Connect the 'cellInitialized' event of the 
ExcelRange bean to the enabled property of this button and set its parameter 
to 'True'.

6. Connect the bound property 'value' to the method 'setText(java.lang.String)' 
of the TextField. The argument for this connection comes from the 'value' 
property of the ExcelCellbean.

7. Connect the 'actionPerformed' event of the button to the property 'value'
of the ExcelCell bean. The argument for this connection comes from the 'text' 
property of the TextField.

8. Connect the 'windowClosing' event of the Frame to the method 'closeWorkbook'
of the ExcelWorkbook bean.

9. Drop another Label on the Frame. Connect the 'workbookName' property of the
ExcelWorkbook bean to the 'text' property of the Label.

10. Customize the 'workbookName' property of the ExcelWorkbook bean and the 
'rangeName', 'worksheetName' properties of the ExcelCell bean appropriately.

11. Set the 'readOnly' property of the ExcelWorkbook bean to false.

Note: The .dat file (for importing into VA Java) is demo.dat and is 
present in the excelaccessor\demo directory. This .dat file contains
the package com.ibm.excelaccessor.demo (ver 1.8) which has both the
demos.

----------------------------------------------------------------------------------------

2. ExcelDemo
------------
What does this demo show?
--------------------------

This demo shows how the capabilities of the two beans in the
ExcelWorksheetAccessor suite of beans (ExcelRange and ExcelWorkbook), 
can be utilized to access data in a range in an Excel Workbook file.

The text property of the range (shown in the main application
window) displays the text in each and every cell in the range, as it 
appears in the Excel file. This property of the range is not editable.
In order to make changes to the text of the cells, another property of 
the range i.e. formula should be edited. The formula property of the 
range represents the values in the individual cells, if the cells do
not contain a formula. It represents the formula strings for 
cells that contain a formula. Editing a formula changes the value
and hence the text for that cell.

The format property of the range is the format string for the range,
if all the cells in that range have the same format. If the formats
for different cells are different, the format is null. Setting the 
format property for the range sets the specified string as the 
format for all the cells in that range.

The noteText property of the range shows the noteText attached to 
the top left cell of the range. Setting the noteText for the range 
sets the noteText for the top left cell of the range.

The demo also demonstrates the feature of the ExcelRange bean that 
can be used to clear range properties. Clearing the contents of the range 
clears the values in each cell of the range. Clearing the format property 
of the range, clears all formatting information for all the cells 
in the range. Clearing the notes property of the range clears all
notes attached with all the cells of the range. A feature is also
provided to clear all the above properties of the range at one go.

All the windows in the demo reflect the current properties of the 
range. If changing a property results in a change to some other
property, the corresponding property window is updated.

This demo has been designed to work only with workbook files and 
worksheets that are not protected.


How to run the demo?
---------------------
First, make sure the ExcelWorksheetAccessor Suite of Beans is properly
installed. For information on installing the ExceWorksheetlAccessor 
Suite of Beans, refer to the installation instructions in the Bean 
User's Guide.

In order to run the demo, you need to have Swing v 1.03 
installed on your local machine. This requires that you set the 
swingall.jar file in the CLASSPATH. Change to the "demo" directory 
under the "excelaccessor" directory. 

Type "java runDemo" on the command prompt to start the demo. 
Open an Excel workbook by selecting the "Open" menu item in the 
"File" menu. Only valid .xls files should be selected. 

Some sample .xls files are provided in the "excelfiles" directory under
"demo" directory. If you have Excel 97 installed on your system,
use the file "sample97.xls". For Excel v5.0, use the file 
"sample95.xls". (Note: Excel v5.0 supports only 8.3 file name formats,
i.e. DOS file names. For this reason, copy "sample95.xls" to a 
suitable directory before using it).

Select a range in the Excel workbook by specifying a worksheet name 
and the range name. The text property of that range will be 
displayed in a table in the main window.

To view and edit the formula property for that range, select the 
"Formula" menu item under the "Edit" menu. A dialog showing the 
formula property for all the cells in the range will be displayed.
Change formulas in that table wherever required, and press the 
"Update" button at the bottom of the dialog.

To view and edit the format property for that range, select the 
"Format" menu item under the "Edit" menu. A dialog showing the 
format property for that range will be displayed. Change the format string
as required in the textfield in that dialog, and press the 
"Update" button at the bottom of the dialog. All the cells in that 
range will be updated with that format.

To view and edit the noteText property for that range, select the 
"Note Text" menu item under the "Edit" menu. A dialog showing the 
noteText associated with the first cell of that range will pop up. 
Change the noteText	 as required in the text area in that dialog,
and press the "Update" button at the bottom of the dialog. The top left 
cell in that range will be updated with that noteText.

To clear all the properties of the range, select the "Clear All" sub-menu 
item from the "Clear" menu item under the "Edit" menu.
To clear the contents of all the cells in the range, select the 
"Clear Contents" sub-menu item from the "Clear" menu item under the 
"Edit" menu.
To clear the formatting information of all the cells in the range, select 
the "Clear Format" sub-menu item from the "Clear" menu item under the 
"Edit" menu.
To clear all the notes of all the cells in the range, select the 
"Clear Notes" sub-menu item from the "Clear" menu item under the 
"Edit" menu.

To close an open file, select the "Close" menu item under the "File"
menu. You will be prompted for a confirmation to save changes, if the
file has been modified. You can select to discard changes at this stage.

In case an Excel error occurs while executing the demo, an "Error"
dialog will pop up, giving the error message received from Excel.


Steps to import demo.dat into Visual Age for Java
=================================================

1. Make sure that ExcelAccessor.dll supplied with the beans is 
   present in the System PATH.
2. For VA Java 1.01, make sure swingall.jar version 1.03 has been 
   imported into the workspace (say in project swing103).
3. Create a new project (say XLA) in the workspace.
4. Import the "excelaccessor.jar" into the XLA project.
5. Import the "demo.dat" file containing "com.ibm.excelaccessor.demo" 
   package version 1.8
6. Add the package "com.ibm.excelaccessor.demo" version 1.8 from the 
   repository to the workspace.
7. For VA Java 2.0 include "JFC class libraries" in the project path.
   (The project path can be edited by selecting the "ExcelDemo" class and 
   then selecting the "Properties" menu item from the "Selected" menu. Then 
   select the "Class Path" tab.)
8. Run the "ExcelDemo" class from the workspace. 
   For VA Java 1.01, a "Command Line Argument"
   dialog comes up. In the classpath textfield, enter
   "..\project_resources\XLA;..\project_resources\Java class libraries;
    ..\project_resources\swing103;..\project_resources\Uvm class libraries;"
   and click the Save button. Then click the Run button to continue.


Wiring
------

The steps for wiring the demo are as follows:

The demo wiring is done using various sub-components. There are a total of 
eight sub-components. Corresponding to each of the four sub-properties,
(with the exception of formula), being displayed in the demo, there 
is one sub-component named "xxxHandler", where "xxx" stands for property 
name. (This is known as "FormulaEditor" for the formula property).
There is one sub-component named "ErrorHandler" for handling any errors 
occurring on the ExcelRange and the ExcelWorkbook beans. For the 
operations, file opening, range selection and file closing, there are 
sub-components named "FileOpener", "RangeSelector", and 
"FileCloseHandler" respectively. In the main wiring diagram, each of 
the sub-components are added as beans. Each of the sub-components has 
a wiring diagram. All these sub-components are then connected together 
to form the wiring of the main demo i.e. the class "ExcelDemo".

Given below are the wiring instructions for each of the eight sub-components :

TextHandler sub-component (This sub-component extends java.lang.Object):
-----------------------------------------------------------------------

1. Drop three variables on the design surface, change their types to
   "java.awt.Frame", "com.ibm.excelaccessor.ExcelWorkbook"
   and "com.ibm.excelaccessor.ExcelRange" respectively and name them 
   appropriately. Using the "Promote Bean Feature", promote the "this" 
   property of these three variables.

2. Add two factories to the design surface and change their types to
   "com.sun.java.swing.JScrollPane" and "com.sun.java.swing.JTable"
   respectively. Add the "com.sun.java.swing.table.DefaultTableModel"
   component to the design surface.

3. Connect the event windowOpened(java.awt.event.WindowEvent) of the 
   variable Frame in the following 3 ways :

	  a. to the constructor JTable() of the JTableFactory.
	  b. to the constructor JScrollPane( java.awt.Component ) of the
		 JScrollPaneFactory. The parameter of this connection is the
		 JTable constructed above (i.e. the 'this' property of the JTable
		 Factory).
	  c. to the method add( java.awt.Component ) of the variable Frame 
		 (the parameter for this connection is the JScrollPane 
		 constructed above (i.e. the 'this' property of the JScrollPane
		 Factory)). The normalResult of this connection is connected to 
		 the validate() method of Frame.

4. The "text" property of the ExcelRange is connected to the method
   setDataVector( java.util.Vector, java.util.Vector ) of the
   DefaultTableModel. The parameters to this connection are the "text" and
   "columnHeaders" properties respectively of the ExcelRange.

5. Connect the event tableChanged( com.sun.java.swing.event.TableModelEvent ) 
   of the DefaultTableModel to method 
   setModel( com.sun.java.swing.table.TableModel ) of the JTable. 
   The parameter for this connection is the 'this' property of the 
   DefaultTableModel itself.

6. Connect the event workbookClosed( com.ibm.excelaccessor.event.ExcelWorkbookEvent )
   of the ExcelWorkbook in the following 2 ways :

	  a. to the method setColumnIdentifiers( java.util.Vector ) of the 
		 DefaultTableModel. The parameter to this connection is set as
		 "(java.util.Vector) null".
	  b. to property "numRows" of DefaultTableModel. The parameter of this
		 connection is set as 0.

7. Connect the event rangeUninitialized( com.ibm.excelaccessor.event.ExcelRangeEvent )
   of the ExcelRange in the following 2 ways :

	  a. to the method setColumnIdentifiers( java.util.Vector ) of the 
		 DefaultTableModel. The parameter to this connection is set as
		 "(java.util.Vector) null".
	  b. to property "numRows" of DefaultTableModel. The parameter of this
		 connection is set as 0.
	  
8. Connect the "this" property of the JTableFactory to the method 
   setAutoResizeMode( int ) of the JTableFactory. Set the parameter for 
   this connection as 0.


FormulaEditor subcomponent (This subcomponent extends java.lang.Object):
------------------------------------------------------------------------

1. Drop three variables on the design surface, change their types to
   "java.awt.Frame", "com.ibm.excelaccessor.ExcelWorkbook"
   and "com.ibm.excelaccessor.ExcelRange" respectively and name them
   appropriately. Using the "Promote Bean Feature", promote the "this"
   property of these three variables.

2. Add two factories to the design surface and change their types to
   "com.sun.java.swing.JScrollPane" and "com.sun.java.swing.JTable"
   respectively. Add the "com.sun.java.swing.table.DefaultTableModel"
   component to the design surface.

3. Add a java.awt.Dialog on the design surface (non-modal and resizable).
   Set layout to BorderLayout. Add a java.awt.Panel in the south of the 
   Dialog. Set the layout of the Panel to FlowLayout. Add the "Update" 
   button to the panel. Connect the event
   windowClosing( java.awt.event.WindowEvent ) of the Dialog to method 
   setVisible( boolean ) of the Dialog. The parameter for this 
   connection is set as "false". Using the	"Promote Bean Feature" 
   promote "show()" of this dialog.

4. Connect the event windowOpened(java.awt.event.WindowEvent) of Frame
   in the following 3 ways :

	  a. to the constructor JTable() of the JTableFactory.
	  b. to the constructor JScrollPane( java.awt.Component ) of the
		 JScrollPaneFactory. The parameter of this connection is the
		 JTable constructed above (i.e. the 'this' property of the JTable).
	  c. to the method add( java.awt.Component ) of the dialog 
		 (the parameter for this connection is the JScrollPane 
		 constructed above (i.e. the 'this' property of the JScrollPane)).

5. The "formula" property of the ExcelRange is connected to the method
   setDataVector( java.util.Vector, java.util.Vector ) of the
   DefaultTableModel. The parameters to this connection are the 
   "formula" and "columnHeaders" properties respectively of the 
   ExcelRange.

6. Connect the event tableChanged( com.sun.java.swing.event.TableModelEvent ) 
   of the DefaultTableModel to method 
   setModel( com.sun.java.swing.table.TableModel ) of the JTable. The 
   parameter for this connection is the 'this' property
   of the DefaultTableModel itself.

7. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Update" button to the property "formula" of the ExcelRange. The 
   parameter for this connection comes from the "dataVector" property 
   of the DefaultTableModel.

8. Connect the event workbookClosed( com.ibm.excelaccessor.event.ExcelWorkbookEvent )
   of the ExcelWorkbook to method setVisible( boolean ) of the Dialog. 
   The parameter for this connection is set as "false".

9. Connect the "this" property of the JTableFactory to the method 
   setAutoResizeMode( int ) of the JTableFactory. Set the parameter for 
   this connection as 0.

10. Connect the event rangeUninitialized( com.ibm.excelaccessor.event.ExcelRangeEvent )
    of the ExcelRange to the method setVisible( boolean ) of the Dialog.
    Set the parameter for this connection as false.


FormatHandler subcomponent (This subcomponent extends java.lang.Object):
-----------------------------------------------------------------------

1. Add a java.awt.Dialog on the design surface (non-modal, BorderLayout
   and resizable). Add a java.awt.Button ("Update" button) in the south of 
   the Dialog. Add a java.awt.TextField and a "Format" label to the center 
   of the dialog. Connect the event windowClosing( java.awt.event.WindowEvent ) 
   of the Dialog to method setVisible( boolean ) of the Dialog. The parameter 
   for this connection is set as "false". Using "Promote Bean Feature" promote 
   "show()" of this dialog.

2. Drop two variables on the design surface, change their types to
   "com.ibm.excelaccessor.ExcelWorkbook" and 
   "com.ibm.excelaccessor.ExcelRange" respectively and name them 
   appropriately. Using "Promote Bean Feature", promote the "this" 
   property of these two variables.

3. Connect the "format" property of the ExcelRange to the 
   setText( java.lang.String ) method of the TextField. The parameter 
   for this connection is taken from the "format" property of the 
   ExcelRange.

4. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Update" button to the property "format" of the ExcelRange. The parameter 
   for this connection comes from the "text" property of the TextField.

5. Connect the event workbookClosed( com.ibm.excelaccessor.event.ExcelWorkbookEvent )
   of the ExcelWorkbook to method setVisible( boolean ) of the Dialog. 
   The parameter for this connection is set as "false".

6. Connect the event rangeUninitialized( com.ibm.excelaccessor.event.ExcelRangeEvent )
   of the ExcelRange to the method setVisible( boolean ) of the Dialog. Set the 
   parameter for this connection as false.



NoteTextHandler subcomponent (This subcomponent extends java.lang.Object):
--------------------------------------------------------------------------

1. Add a java.awt.Dialog on the design surface (non-modal and resizable). Set
   layout to BorderLayout. Add a java.awt.Panel in the south of the Dialog. 
   Set the layout of the Panel to FlowLayout. Add the "Update" button to the
   panel. Connect the event windowClosing( java.awt.event.WindowEvent ) of the 
   Dialog to method setVisible( boolean ) of the Dialog. The parameter for 
   this connection is set as "false". Using "Promote Bean Feature" promote 
   "show()" of this dialog. Add a java.awt.TextArea to the center of the 
   Dialog.

2. Drop two variables on the design surface, change their types to
   "com.ibm.excelaccessor.ExcelWorkbook" and 
   "com.ibm.excelaccessor.ExcelRange" respectively and name them 
   appropriately. Using the "Promote Bean Feature", promote the "this" 
   property of these two variables.

3. Connect the "noteText" property of the ExcelRange to the 
   setText( java.lang.String ) method of the TextArea. The parameter for
   this connection comes from the property "noteText" of the ExcelRange.

4. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the "Update"
   button to the property "noteText" of the ExcelRange. The parameter for this
   connection comes from the "text" property of the TextArea.

5. Connect the event workbookClosed( com.ibm.excelaccessor.event.ExcelWorkbookEvent )
   of the ExcelWorkbook to method setVisible( boolean ) of the Dialog. 
   The parameter for this connection is set as "false".

6. Connect the event rangeUninitialized( com.ibm.excelaccessor.event.ExcelRangeEvent )
   of the ExcelRange to the method setVisible( boolean ) of the Dialog. Set the 
   parameter for this connection as false.



ErrorHandler subcomponent (This subcomponent extends java.lang.Object):
------------------------------------------------------------------------

1. Add a java.awt.Dialog on the design surface (modal and non-resizable). 
   Add a java.awt.Button ("OK" button) in the south of the Dialog. 
   Add a java.awt.TextArea (non-editable) to the center of the dialog.
   Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "OK" button to method dispose() of the Dialog.

2. Drop two variables on the design surface, change their types to
   "com.ibm.excelaccessor.ExcelWorkbook" and 
   "com.ibm.excelaccessor.ExcelRange" respectively and name them
   appropriately. Using "Promote Bean Feature", promote the "this" 
   property of these two variables. 

3. Connect the events
   (a) excelError( com.ibm.excelaccessor.event.ExcelWorkbookErrorEvent )
   (b) inaccessibleWorkbook( com.ibm.excelaccessor.event.ExcelWorkbookErrorEvent )
   (c) writeModeOpenFailed( com.ibm.excelaccessor.event.ExcelWorkbookErrorEvent )
   of the ExcelWorkbook and excelError( com.ibm.excelaccessor.event.ExcelRangeErrorEvent )
   of the ExcelRange to the property "text" of the TextArea. For each of
   the connections check-mark the "Pass event data" checkbox.

4. Connect the events excelRangeError of the ExcelRange and excelWorkbookError
   of the ExcelWorkbook to the show() method of the dialog.


FileOpener subcomponent (This subcomponent extends java.awt.Dialog):
--------------------------------------------------------------------

1. Set the dialog to be modal and non-resizable.
   Add 3 java.awt.Buttons ("OK", "Cancel" and "Browse" button) in the Dialog. 
   Add the "File Name" java.awt.Label and java.awt.TextField to the dialog.
   
2. Drop two variables on the design surface, change their types to
   "com.ibm.excelaccessor.ExcelWorkbook" and 
   "java.lang.String" respectively and name them appropriately. 
   Using "Promote Bean Feature", promote the "this" property of the 
   ExcelWorkbook variable. 

3. Connect the event windowOpened( java.awt.event.WindowEvent ) of the 
   dialog to the property "text" of the TextField. The parameter for this 
   comes from the "workbookName" property of the ExcelWorkbook.

4. Add a java.awt.FileDialog to the design surface. Customize the "directory"
   property to "c:\\" and the "file" property to "*.xls". Connect the event
   actionPerformed( java.awt.event.ActionEvent ) of the "Browse" button
   to the method show() of the FileDialog. Connect the normalResult of this
   to the dispose() of the FileDialog. Connect again the normalResult to the
   "this" of the String variable (lets say it is named DirectoryString)
   getting the parameter from the property "directory" of the FileDialog. Connect 
   again the normalResult to the concat( java.lang.String ) method of the 
   DirctoryString getting the parameter from the property "file" of the FileDialog.
   The normalResult of the concat call is connected to the "text" 
   property of the TextField. The exceptionOccured of the concat call
   is connected to the "text" property of the TextField. The parameter 
   for this connection is set as a blank string.

5. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the "OK"
   and "Cancel" buttons to the method dispose() of the Dialog.

6. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "OK" button to openWorkbook() of the ExcelWorkbook. Connect the event
   fetchArgumentsCalled( com.ibm.excelaccessor.event.FetchArgumentsEvent )
   of the ExcelWorkbook to the property "workbookName" of the 
   ExcelWorkbook. The parameter for this connection comes from the 
   property "text" of the TextField.
  

RangeSelector sub-component (This sub-component extends java.awt.Dialog):
-----------------------------------------------------------------------

1. Set the dialog to be modal and non-resizable.
   Add 2 java.awt.Buttons ("OK" and "Cancel" buttons) in the Dialog. 
   Add the "Worksheet Name" and "Range Name" java.awt.Label and 
   java.awt.TextField to the dialog. Add a java.awt.CheckBox (name it
   "Auto Create Worksheet") to the dialog. Connect the event
   actionPerformed( java.awt.event.ActionEvent ) of the "OK" and 
   "Cancel" buttons to method dispose() of the Dialog.

2. Drop a variable on the design surface, change its type to
   "com.ibm.excelaccessor.ExcelRange" and name it appropriately. 
   Using "Promote Bean Feature", promote the "this" property of the 
   ExcelRange variable. 

3. Connect the event windowOpened( java.awt.event.WindowEvent ) of the dialog
   in the following 3 ways :
	  a. to the property "text" of the "Worksheet Name" TextField. The 
		 parameter for this comes from the "worksheetName" property of 
		 the ExcelRange.
	  b. to the property "state" of the "Auto Create Worksheet" checkbox. 
		 The parameter for this comes from the "autoCreateSheet" property 
		 of the ExcelRange.
	  c. to the property "text" of the "Range Name" TextField. The parameter
		 for this comes from the "rangeName" property of the ExcelRange.

4. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "OK" button to initRange() method of the ExcelRange. Connect the event 
   fetchArgumentsCalled ( com.ibm.excelaccessor.event.FetchArgumentsEvent ) 
   of the ExcelRange in the following 3 ways :
	  a. to the property "worksheetName" of the ExcelRange. The parameter for
		 this connection comes from the property "text" of the 
		 "Worksheet Name" TextField.
	  b. to the property "autoCreateSheet" of the ExcelRange. The parameter for
		 this connection comes from the property "state" of the
		 "Auto Create Worksheet" checkbox.
	  c. to the property "rangeName" of the ExcelRange. The parameter for
		 this connection comes from the property "text" of the 
		 "Range Name" TextField.


FileCloseHandler sub-component (This sub-component extends java.lang.Object):
----------------------------------------------------------------------------

1. Add a java.awt.Dialog on the design surface (modal and non-resizable). 
   Add 2 java.awt.Buttons ("Yes" and "No" buttons) in the south of the Dialog. 
   Add a java.awt.Label ("Do you wish to save the changes?") to the center 
   of the dialog.

2. Drop a variable on the design surface, change its type to
   "com.ibm.excelaccessor.ExcelWorkbook" and name it appropriately.
   Using the "Promote Bean Feature", promote the "this" property of the variable.
   Also promote the method closeWorkbook() of the variable.	 

3. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the "Yes"
   button in the following 2 ways :
	  a. to the method setSaveOnClose( boolean ) of the ExcelWorkbook. 
		 The parameter for this connection is set as true.
	  b. to the dispose() method of the dialog.

4. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the "No"
   button in the following 2 ways :
	  a. to the method setSaveOnClose( boolean ) of the ExcelWorkbook. 
		 The parameter for this connection is set as false.
	  b. to the dispose() method of the dialog.

5. Connect the event savingFile( com.ibm.excelaccessor.event.FileSavingEvent )
   of the ExcelWorkbook to the method show() of the dialog.


The wiring instructions for the main wiring diagram (class "ExcelDemo") 
are as follows (ExcelDemo extends java.awt.Frame and its layout is BorderLayout):  

1. Drop all the 8 sub-components described above on to the design surface.
   Drop com.ibm.excelaccessor.ExcelRange and com.ibm.excelaccessor.ExcelWorkbook
   onto the design surface. Set the "readOnly" property of the ExcelWorkbook
   bean to be false.

2. For each of the sub-components, ExcelWorkbook and/or ExcelRange and/or
   Frame were variables and had been promoted as bean features. All
   these promoted features need to be connected. Connect the ExcelWorkbookthis
   promoted feature (on the sub-components) to the 'this' property of 
   ExcelWorkbook, the ExcelRangethis promoted feature (on the sub-components)
   to the 'this' property of ExcelRange, and the Framethis promoted feature to 
   the 'this' property of the Frame (for each sub-component).

3. Connect the "this" property of the ExcelWorkbook to the property
   "xlWorkbook" of the ExcelRange bean.

4. Drop a menu bar on the Frame. Drop two menus "File" and "Edit" on the 
   menu bar. 
      The "File" menu contains the 3 menu items, viz. "Open...", 
   "Select Range..." and "Close". 
      The "Edit" menu contains 3 menu items, viz. "Formula...", "Format...",
   and "NoteText...", and one menu "Clear".
      The "Clear" menu contains 4 menu items, viz. "Clear All", 
   "Clear Contents", "Clear Formats", "Clear Notes".  

5. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Open..." menu item to the method show() of the FileOpener sub-component.

6. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Select Range..." menu item to the method show() of the RangeSelector 
   sub-component.

7. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Close" menu item to the method excelWorkbookCloseWorkbook() of the 
   FileCloseHandler sub-component.

8. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Formula..." menu-item to the method dialog1show() of the FormulaEditor
   sub-component.

9. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Format..." menu-item to the method dialog1show() of the 
   FormatHandler sub-component.

10. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
   "Note Text..." menu item to the method dialog1show() of the 
   NoteTextHandler sub-component.

11. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
    "Clear All" menu item to the method clear() of the ExcelRange bean.

12. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
    "Clear Contents" menu item to the method clearContents() of the 
    ExcelRange bean.
	
13. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
    "Clear Formats" menu item to the method clearFormats() of the 
    ExcelRange bean.

14. Connect the event actionPerformed( java.awt.event.ActionEvent ) of the 
    "Clear Notes" menu item to the method clearNotes() of the ExcelRange
    bean.

15. Connect the "initialized" property of the ExcelRange to the property
    "enabled" of the "Edit" menu.

16. Connect the event workbookClosed( com.ibm.excelaccessor.event.ExcelWorkbookEvent ) 
    of the ExcelWorkbook to the setEnabled( boolean ) method of the 
    "Edit" menu. The parameter for this connection is set to false.

17. Connect the "opened" property of the ExcelWorkbook in the following 2 ways : 
	   a. to the "enabled" property of the "Select Range..." menu item.
	   b. to the "enabled" property of the "Close" menu item.

18. Connect the event windowClosing( java.awt.event.WindowEvent ) of the ExcelDemo
    to the method closeWorkbook() of the ExcelWorkbook.
