Please enable JavaScript to view this site.

A-Shell Reference

 

 

AddComment

//XL, AddComment, row=##, col=##, text=text {,width=pixels} {,height=pixels}

As of A-Shell 6.5.1668, this directive is ignored for XLSX format—i.e. is only supported for XLS format.

 

DefineFont

//XL, DefineFont, {fontid=}<fontid>, {name=<name>} {,size=<pointsize>} {,color=COLOR_xxx} {,Common //XL Parameters}

Defines a font and gives it an identifier which can then be used in a subsequent DefineFormat directive. This is only necessary when you want to use the same font in multiple formats, columns or rows. Otherwise, you can specify the font attributes directly when defining the format or setting the column or row attributes.

Examples

//;Define bold green font, assign fontid “bold_green” 

//XL,DefineFont,fontid=bold_green,bold,COLOR_GREEN

 

//;Define 14 Courier font, name it “courier14” 

//XL,DefineFont,fontid=courier14,fontsize=14, fontname=Courier New

 

DefineFormat

//XL, DefineFormat, {formatid=}<formatid> {,Common //XL Parameters}

Defines a format and gives it an identifier which can then be used in a subsequent SetCol and SetRow directives. This is only necessary when you want to use the same format in multiple columns or rows. Otherwise, you can specify the format attributes directly in the SetCol and/or SetRow directives.

Examples

//;Define format named “fmtx” using bold_green font 

//XL,DefineFormat,formatid=fmtx,fontid=bold_green,ALIGNH_CENTER

 

//;Define format named “fmtpink” with pink bg, bold violet text 

//XL,DefineFont,formatid=fmtpink, FILLPATTERN_SOLID, patternfgc=COLOR_PINK, bold, fontcolor=COLOR_VIOLET

 

MergeCells

//XL,MergeCells,colfirst=#,collast=#{,rowfirst=#}{,rowlast=#}

Merges the specified cells into one. The row parameters default to the next data row following the directive, so it can be inserted just before the data in question. For example:

//XL,MergeCells,colfirst=3,collast=5

data1,data2,data3,,,data6

 

In the above example, columns 3-5 would be merged and would contain "data3". Note that you don't normally try to put anything into the cells that otherwise disappear as part of the merge.

History

2025 February, A-Shell 7.0.1769:  Directive added to CSV2XL.SBX.

 

SetAppendSeqno

//XL,SetLaunch,#

//XL,SetAppendSeqno,#

Overrides the AppendSeqno options from the ini file. 0 disables, 1 enables. Must be placed after any SetIni directive.

 

SetDefaultFont

//XL, SetDefaultFont {,fontname=<fontface>} {,fontsize=<pointsize>}

Establishes the default font face and size to be used by the spreadsheet app.

Example

//XL,SetDefaultFont,fontname=Courier New,fontsize=12

 

SetIni

//XL, SetIni, <inifile>

Establishes the name of the ini file, overriding the one specified in the printer initialization file or subroutine. This directive can only appear once in a source file, and must appear at the top, before any data lines.

Example

//XL,SetIni,BAS:CUSXLS.INI

 

SetLaunch

//XL,SetLaunch,#

Overrides the Launch option from the ini file. 0 disables, 1 enables. Must be placed after any SetIni directive.

 

SetOutputFormat

//XL,SetOutputFormat,<format>

Overrides the OutputFormat directive in the ini file. The two <format> options in either case are XLS and XLSX. As with the SetIni directive, it has to appear in the CSV source file prior to any lines that do not start with //XL.

 

SetPageBreak

//XL,SetPageBreak{row=#}{,col=#}

Forces a break to occur after the specified row and/or column when the spreadsheet is printed. The default row is the current position. To set a column page break without a row pagebreak, set row=-1. Note that page breaks may be seen in Excel by activating Page Break Preview from the View menu, or by using the Print Preview.

History

2025 February, A-Shell 7.0.1769:  Directive added to CSV2XL.SBX.

 

SetRow

//XL, SetRow, {row = #} {,rowfirst=#} {,rowlast=#} {,height = #} {,Common //XL Parameters}

Sets attributes for a row or group of rows. The first row is considered row 1, whether it contains headings or data. It should be specified before the affected data rows. If the none of the row* parameters are specified, the directive affects the next row to be output. To specify all rows, set rowlast to a number greater than the actual number of rows (e.g. 999999).  Height is set in typographical points. The directive also supports setting attributes (such as colors) for the next row or a specified set of rows yet to be output.

 

SplitRow, SplitCol

//XL, SplitRow, row

//XL, SplitCol, column

Note that these are good examples of directives that may be in either the ini file or the CSV file.

The Split options might also be thought of as "freeze" as they control the number of rows and/or columns that remain in position while the others are allowed to scroll vertically and/or horizontally. The default for SplitRow is 1, which freezes the top 1 or 2 rows, depending on whether a banner was defined. Setting it to a larger number freezes the rows less than the specified number (e.g. SplitRow,4 freezes 3 rows.) SplitCol defaults to 0; both 0 and 1 result in no columns frozen. To freeze N columns, set SplitCol to N+1.

Also note that the Excel user interface refers to this same concept as "Freeze Panes". Here, the "split" is a reference to "split scrolling", i.e. the division between the rows or columns that are frozen in place at the top/left, and the ones that are subject to scrolling.

The row and column "number of" parameters specifies the first row (from top) or column (from left) subject to scrolling, or one more than the frozen row or column. For example:

//XL,SplitRow,3

//XL,SplitCol,2

would cause the first two rows and first column to be frozen (not scroll).