Setting an excel cell to bold using OleAutomationObject

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Setting an excel cell to bold using OleAutomationObject

Postby cjaouhar » Mon Jan 07, 2008 6:20 am

I control an excel spreadsheet in smalltalk using OleAutomationObject. I can write data to cell using "aRange propertyAt: 'Value' put: myString". Which property can I use in order to set a cell as Bold and what is the valid value?

CJ
cjaouhar
 
Posts: 3
Joined: Thu Nov 16, 2006 2:03 am

Re: Setting an excel cell to bold using OleAutomationObject

Postby marten » Mon Jan 07, 2008 11:05 am

cjaouhar wrote:I control an excel spreadsheet in smalltalk using OleAutomationObject. I can write data to cell using "aRange propertyAt: 'Value' put: myString". Which property can I use in order to set a cell as Bold and what is the valid value?

CJ


I do not know it, but when googling around one seem to have to execute something like

mysheet.cells(1, 1).font.bold = True

...actually this should give one a hint, where to search for the solution. In one of my books I read:

Range("B15").Font.Bold = true ...

Marten
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Setting an excel cell to bold using OleAutomationObject

Postby cjaouhar » Thu Jan 24, 2008 11:13 pm

Using the "Bold" property works fine to make a cell bold. Now which property can I use in order to put a color on a particular cell?
cjaouhar
 
Posts: 3
Joined: Thu Nov 16, 2006 2:03 am

Re: Setting an excel cell to bold using OleAutomationObject

Postby marten » Fri Jan 25, 2008 1:53 am

cjaouhar wrote:Using the "Bold" property works fine to make a cell bold. Now which property can I use in order to put a color on a particular cell?


Perhaps a look at:

http://www.cpearson.com/excel/colors.htm

should give you a help ?

Marten
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest