Knowledge Base

Welcome to The Carlisle Group's Knowledge Base.

Search or Ask a Question

This is a keyword search that looks for matching articles that contain one or more words specifically by a user in articles’ tags, title and content. Admin writes brief intro content here via admin end. If you are unable to find an answer to your issue, please submit an issue here.

Back to Articles List

Scripting ExcelFile.SetRangeFontFormat method details | CAS 6.0

Added: 02/29/2016; Last Modified: 05/12/2016; Visits:1,559

The ExcelFile.SetRangeFontFormat takes two arguments.  The first is a CharString object instance with the range that formatting will be applied.  The second is a CharString instance of comma separated name-value property pairs.  

 

Available options as of CAS 6.0.381

 

PropertyValueDescriptionLink
Background{Integer}Bakground color indexMSDN Link
BoldTrue
False
  
ColorIndexHex StringFont hex color code 
ItalicTrue
False
  
Name{Character String}Font name 
Size{Integer}  
StrikethroughTrue
False
  
SubscriptTrue
False
  
UnderlineTrue
False
  
VerticalAlignmentxlBottom
xlCenter
xlDistributed
xlJustify
xltop
 MSDN Link
HorizontalAlignmentxlCenter
xlDistributed
xlJustify
xlLeft
xlRight
 MSDN Link
BackgroundColorHex StringBackground hex color code   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example:

 

CS ← CharString.New  'Text to format'
XL ← ExcelFile.New ''
RANGE ← XL.Put 'C5' CS 
FMT ← CharString.New 'Background=3,Bold=True,Italic=True,Name=Arial Black,Size=20,ColorIndex=10'
XL.SetRangeFontFormat RANGE FMT
XL.MakeVisible 1