# Cross spreadsheet reference

This appendix is a reference of the cross spreadsheet or axs. The cross spreadsheet is started with the `axs` command. All control commands are bound to the `axs` nameset.

create

The `axs:create` command create a new sheet in the folio. In order to succeed, a folio object must exist prior creating a sheet. Without argument, a default sheet is created without name. The optional argument is the sheet name

axs:create axs:create name
(axs) axs:create "data"

This example create a sheet with the name `data`. Once the sheet has been created, it becomes the default sheet.

export

The `axs:export` command exports the contents of the default sheet to the specified file. When exported, the sheet is formatted in such way that it can be read again with the import command.

axs:export file
(axs) axs:export "elements.txt"
import

The `axs:import` command imports data into the current sheet. The data must be formatted in such way that they are readable by the reader. In particular, the string must be placed between double quotes and the character between single quotes. Blank and tabulation characters are used as separators.

axs:import file
(axs) axs:import "elements.tbl"
info

The `axs:info` command prints some information about the folio. Among the information is the folio name and the current sheet. An optional output stream argument can be used to write the sheet information.

axs:info axs:info file
(axs) axs:info
insert

The `axs:insert` command insert data into the current sheet. The data are seen as a vector of literals. When the command is executed, a record is automatically created, filled with the data and inserted into the sheet.

axs:insert data+
(axs) axs:insert "hello" "world" 2006

In this example, a record of 3 elements is created with 2 strings and one integer.

insert-info

The `axs:insert-marker` command insert marker data into the current sheet. The data are seen as a vector of literals. When the command is executed, the marker record is filled with the data. This command is similar to the `axs:insert`. The marker record is primarily used to mark the sheet columns.

axs:insert-marker data+
(axs) axs:insert-marker "hello" "world" 2006

In this example, the 2 strings and one integer are added into the sheet marker record.

insert-header

The `axs:insert-header` command insert header data into the current sheet. The data are seen as a vector of literals. When the command is executed, the header record is filled with the data. This command is similar to the `axs:insert`

axs:add-info data+
(axs) axs:add-info "hello" "world" 2006

In this example, the 2 strings and one integer are added into the sheet informatino record.

insert-footer

The `axs:insert-footer` command insert footer data into the current sheet. The data are seen as a vector of literals. When the command is executed, the footer record is filled with the data. This command is similar to the `axs:insert`

axs:add-info data+
(axs) axs:add-info "hello" "world" 2006

In this example, the 2 strings and one integer are added into the sheet informatino record.

new

The `axs:new` command create a new folio. Without argument an empty folio is created. With one string argument, a new folio is created with the argument name. with two arguments, a new folio is created by name and info. If a folio already exists, it is closed prior the creation of the new one.

axs:new axs:new name
(axs) axs:new "elements"
open

The `axs:open` command open a new folio those name is the file name given as the argument. The file name must corresponds to a serialized folio that was generated with the `axs:save` command.

axs:open file
(axs) axs:open "elements.xss"
save

The `axs:save` command saves the current folio into a file those name is given as the argument. The `axs:save` command operates by serializing the folio.

axs:save file
(axs) axs:save "elements.xss"
select

The `axs:select` command selects a sheet by index. Since there is no guarantee that the sheet name is unique, an index is more appropriate to guarantee a unique selection. Once selected, the sheet becomes the default one.

axs:select index
(axs) axs:select 1
list

The `axs:list` command reports the folio contents. For each sheet, the index, the sheet name and size is reported. With an argument, the reported information is written to an output stream. By default, the standard output is used for reporting.

axs:list axs:list file
(axs) axs:list
view

The `axs:view` command display the sheet contents by using the cell literal representation. Without argument, the entire tale is reported. With one integer argument as the report size, only the specified number of elements is reported. A second integer argument that acts as a starting index can also be used.

axs:view axs:view length axs:view length start
(axs) axs:view