Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Utility program LIBXLVIEW (source online here) reads an existing XLS file and creates a new one illustrating the use of fonts and formats within the original. This may be useful when trying to match the structure of an existing model spreadsheet file. To illustrate, here is the output of RUN LIBXLVIEW on the Sample Invoice shown in the previous section:

ashref_img52

It creates a new XLS file illustrating the use of fonts and formats in the first sheet of the source XLS file:

ashref_img53

 

The first sheet (above) lists all the fonts defined in the original. One anomaly you'll note is that XLS files often contain many fonts that either aren't used or which are effectively duplicates. (This is particularly noticeable when creating an empty spreadsheet file using Excel.) In the example above, the samxlinv.bp program explicitly created only the last three fonts; the others were created by default (and can probably be ignored for our purposes.)

ashref_img54

 

The second sheet (above) lists all the formats defined in the original. As with the fonts, you may find that there are many formats defined by default. In this example, only the last 8 were explicitly defined by the samxlinv.bp program.

ashref_img55

 

The final sheet (above) represents the first sheet of the original/source XLS file, with each cell's contents replaced by the handle of the associated format. The colors are simply added to make it easier to identify cells with the same format. For comparison, here is the original again:

ashref_img56

 

Column A of the diagnostic sheet shows that all of the cells in column A of the original have the same format. This includes the cell containing the image. (The image is independent of the cell's format.)

Looking at the original invoice sheet, if you are wondering about the format used for row 7 (the Description and Amount header), you can look in the corresponding cells of the diagnostic sheet (colored yellow in this case), which indicates the format handle 650A180. For details on that format, you can then go back to the Format sheet and locate that handle in column A.

The matching row (26) is show below (wrapped):

ashref_img57

 

ashref_img58

 

ashref_img59

 

The above indicates, for example, that the tan background color is achieved by setting the FillPattern to FILLPATTERN_SOLID, the PatternFGC to COLOR_TAN, and the PatternBGC to the default.