. .


Working with Excel: Video

March 16, 2010 8:05:41.572

Today's screencast looks at working with Excel from Smalltalk. Here's the workspace I used in the screencast:

"Excel Demonstration"
excel := COMDispatchDriver createObject: 'Excel.Application'.

"Open Excel"
excel setVisible: true.
excel getWorkbooks Add.
sheet := excel getActiveSheet.

"Write some data"
(excel getRange: 'A1') setValue: 'Name'.
(excel getRange: 'A2') setValue: 'Fred Flintstone'.
(excel getRange: 'A1:A2') getFont setBold: true.

"Read a cell"
(excel getRange: 'A1') getValue.

"Copy Cells"
(excel getRange: 'A1:A2') Select.
excel setCutCopyMode: false.
excel getSelection Copy.
Transcript show: Screen default getExternalSelection.

To watch, click on the viewer below:

You can download the video directly here. If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , , ,

posted by James Robertson

 Share Tweet This