The clods-export Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The clods-export Reference Manual

This is the clods-export Reference Manual, version 1.0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:28:29 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

clods-export

It is sometimes necessary to offer users of e.g. a web service the option to export their data from your application to the outside world. Often, a good format would be a spreadsheet document, as it offers a simple way of displaying and editing tabular data, and people have over the years become quite familiar in misusing Excel for a variety of things Excel was not designed for.

clods-export helps you by writing out OpenDocument Spreadsheet files. It does not try to implement functionality needed by proper spreadsheet applications and it does not support reading in ODS formatted data, but it tries to make creation of ODS files straightforward and easy.

For a quick start, look at example.lisp. A short API reference is given below, but to fully understand how all parameters work I recommend studying the OpenDocument XML format specification as well.

Caveat! Different software (Excel, LibreOffice, OpenOffice) handle ODS data in a different manner, and are a bit incompatible. So, you should check your generated data on all of the applicable programs in order to see that all formatting goes through as you intended.

Document structure

An ODS document consists of three parts: Definitions for fonts, definitions for styles, and the actual data content. These parts must be specified, in this order, to clods-export as well.

Start by wrapping your export functionality inside a with-spreadsheet form. The name of the generated ODS file is given as an argument, along with metadata (name of the application generating the document and the human creator of the data). Inside the spreadsheet, you then define fonts, styles and content:

(clods:with-spreadsheet ("my.ods" :generator "My app" :creator "Me")
  (clods:using-fonts ()
    ...)
  (clods:using-styles (:locale ...)
    ...)
  (clods:with-body ()
    (clods:with-table ("Sheet one")
      ...)
    (clods:with-table ("Sheet two")
      ...)
    ...))

Specifying fonts

Fonts are specified using the clods:font function inside a clods:using-fonts form. clods:font takes the name of the font definition as its first argument, and a number of optional key arguments describing the font properties:

Note that certain font details can be specified along with text properties when defining cell styles, as well.

Excel understands the name of the font definition as a synonym for the font family. That is, if you want to be Excel compatible, you must match the font's name argument with the :family argument:

;; works on LibreOffice and OpenOffice but not on Excel:
(clods:font "normal" :family "Arial")
;; works on all three:
(clods:font "Arial" :family "Arial")

Specifying styles

ODS defines formatting on several levels. On the lowest level, there are data styles (number styles) that specify how data is formatted into strings to be displayed. Then, cell styles specify formatting inside a single cell. Column and row styles define the width/height of the column/row as well as the default cell style to be applied.

Styles are defined hierarchically, so that styles can inherit properties from other styles. However, this inheritance fails spectacularly on LibreOffice and OpenOffice (but does seem to work on Excel), so it is probably a good idea to define every style from the bottom up.

Both data styles and cell styles also contain text properties that define visual aspects of the displayed text.

Locales

Locale, as defined by clods-export, is a simple object that contains the following four slots:

Locales can be created with the function clods:make-locale. For example, the Finnish locale, where a large decimal number is written as "1 234 567,89", would be defined as follows:

(clods:make-locale "FI" #\space 3 #\,)

Text properties

Text property definitions are lists containing pairs of keywords and values. The set of supported keywords is listed in clods:*text-properties* and they map directly to those defined in the OpenDocument specification.

Number formatting

Numbers can be displayed in three different representations: standard numbers, scientific numbers and fractions. The representation to be used is deduced from the arguments in the number format specification, which is a list of keyword-value pairs. The following keywords are supported:

Note that LibreOffice and OpenOffice require quite complete number specifications in order to display numbers correctly. Thus, you should specify things like :min-integer-digits 1 even though they seem superfluous, if you wish these applications to show your data correctly.

Data styles

There are several different data formatting types. In addition to the type-specific arguments described below, they all accept the keyword arguments :locale (of type locale) and :text-properties (a list that contains text property definitions).

Cell styles

For a cell style, you can define text properties, and a set of other formatting keyword arguments:

(clods:cell-style name parent-style text-properties &key ...)

Cell styles support inheritance, so you can build your styles on top of each other by using the parent-style argument. Note, though, that not all applications obey the inheritance.

The available keyword arguments are:

Row styles

Row styles are defined as follows:

(clods:row-style name parent-style &key ...)

The available keyword arguments are:

Column styles

Column styles are defined as follows:

(clods:column-style name parent-style &key ...)

The available keyword arguments are:

Table styles

Table styles are included for the sake of completeness.

(clods:table-style name parent-style &key ...)

The available keyword arguments are:

Table content

Each worksheet on the document are defined inside a clods:with-table form. The sheet's name, usually shown on a tab at the bottom of the spreadsheet application's view, is given as an argument. Inside the with-table form first the table's columns are defined, followed by the rows containing the actual data in cells:

(clods:with-table ("Table name")
  (clods:with-header-columns ()
    (clods:column ...)
    ...)
  (clods:with-header-rows ()
    (clods:with-row (...)
      (clods:cell ...)
      ...)
    ...)
  (clods:with-row (...)
    (clods:cell ...)
    ...))

The semantic grouping of certain columns and rows into the header columns/rows groups is optional and has no visual effect on the table.

Defining columns

(clods:column &key repeat style visibility cell-style)

Defining rows

(clods:with-row (&key repeat style visibility cell-style) ...)

The keyword arguments are similar to those given to clods:column.

Defining cells

(clods:cell content &key style formula span-columns span-rows link)

Cells contain the actual data on the table. The content of each cell is given in the content argument that may be nil if the cell is empty. The keyword arguments are as follows:

If the cell contains a :style argument, that style is used for formatting. Otherwise, if the current row has specified a :cell-style, that is used. If not, but the current column specifies a :cell-style, it takes effect. Otherwise, only string content is supported.

In addition to the data style specified by the active cell style, the formatting of the cell's content depends on the type of the content argument.

(clods:cells &rest content)

For convenience, a set of adjacent cells on the same row requiring no special formatting can be written out in a single function call to clods:cells.

(clods:covered-cell &optional n)

When a cell has a :span-rows argument larger than 1, the adjacent cells on the following rows in the same column (that is, those cells covered by the spanning cell) have to be marked as covered. clods-export does not take care of this; it is left to the application.

Contact information

If you have a bug to report, or an enhancement to suggest, you can reach me at jussi@lahdenniemi.fi.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 clods-export

Maintainer

Jussi Lahdenniemi <jussi@lahdenniemi.fi>

Author

Jussi Lahdenniemi <jussi@lahdenniemi.fi>

License

MIT

Description

Common Lisp OpenDocument spreadsheet export library

Version

1.0.1

Dependencies
Source

clods-export.asd (file)

Component

clods (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 clods-export/clods

Parent

clods-export (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 clods-export.asd

Location

clods-export.asd

Systems

clods-export (system)

Packages

clods-export-system


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 clods-export/clods/package.lisp

Parent

clods (module)

Location

src/package.lisp

Packages

clods-export


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 clods-export/clods/namespaces.lisp

Parent

clods (module)

Location

src/namespaces.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 clods-export/clods/util.lisp

Parent

clods (module)

Location

src/util.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 clods-export/clods/locale.lisp

Parent

clods (module)

Location

src/locale.lisp

Exported Definitions

make-locale (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 clods-export/clods/ods.lisp

Dependencies
Parent

clods (module)

Location

src/ods.lisp

Exported Definitions

with-spreadsheet (macro)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 clods-export/clods/fonts.lisp

Dependency

ods.lisp (file)

Parent

clods (module)

Location

src/fonts.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 clods-export/clods/text.lisp

Dependencies
Parent

clods (module)

Location

src/text.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 clods-export/clods/numbers.lisp

Dependencies
Parent

clods (module)

Location

src/numbers.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 clods-export/clods/styles.lisp

Dependencies
Parent

clods (module)

Location

src/styles.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.11 clods-export/clods/content.lisp

Dependency

ods.lisp (file)

Parent

clods (module)

Location

src/content.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 clods-export-system

Source

clods-export.asd

Use List

Previous: , Up: Packages   [Contents][Index]

5.2 clods-export

Source

package.lisp (file)

Nickname

clods

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *font-generic-families*

The list of generic font families supported by ODS documents.

Package

clods-export

Source

fonts.lisp (file)

Special Variable: *font-pitches*

The list of font pitches supported by ODS documents.

Package

clods-export

Source

text.lisp (file)

Special Variable: *font-reliefs*

The valid font relief modes.

Package

clods-export

Source

text.lisp (file)

Special Variable: *font-sizes*

The list of font sizes supported by ODS documents.
Alternatively, a string value can be used specifying the font size in CSS format (e.g. "18pt" or "1.2cm)".

Package

clods-export

Source

fonts.lisp (file)

Special Variable: *font-stretches*

The list of font stretch values supported by ODS documents.

Package

clods-export

Source

fonts.lisp (file)

Special Variable: *font-styles*

The list of font styles supported by ODS documents.

Package

clods-export

Source

fonts.lisp (file)

Special Variable: *font-variants*

The list of font variants supported by ODS documents.

Package

clods-export

Source

fonts.lisp (file)

Special Variable: *font-weights*

The list of font weights supported by ODS documents. Additionally, numeric values 100-900 can be used.

Package

clods-export

Source

fonts.lisp (file)

Special Variable: *line-modes*

The valid line modes.

Package

clods-export

Source

text.lisp (file)

Special Variable: *line-styles*

The valid ODS line styles.

Package

clods-export

Source

text.lisp (file)

Special Variable: *line-types*

The valid ODS line types.

Package

clods-export

Source

text.lisp (file)

Special Variable: *line-widths*

The valid line widths. Alternatively, a standard CSS length spec can be used (e.g. "2pt" or "0.1cm").

Package

clods-export

Source

text.lisp (file)

Special Variable: *script-types*

The valid script types.

Package

clods-export

Source

text.lisp (file)

Special Variable: *text-properties*

The set of supported keywords for text-properties.

Package

clods-export

Source

text.lisp (file)

Special Variable: *text-transforms*

The valid text transformations.

Package

clods-export

Source

text.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Macros

Macro: using-fonts () &body BODY

Specify the fonts to be used in the document.

Package

clods-export

Source

fonts.lisp (file)

Macro: using-styles (&key LOCALE) &body BODY

Specify the styles to be used in the document. The default locale can be specified; in this case, all styles get that locale automatically.

Package

clods-export

Source

styles.lisp (file)

Macro: with-body () &body BODY

This form encloses the actual content of the spreadsheet document.
The document consists of 1 to n tables that are written with the with-table macro.

Package

clods-export

Source

content.lisp (file)

Macro: with-header-columns () &body BODY

Header columns may be grouped together with this form.
They do not have a visual effect, but may carry a semantic meaning.

Package

clods-export

Source

content.lisp (file)

Macro: with-header-rows () &body BODY

Header rows may be grouped together with this form.
They do not have a visual effect, but may carry a semantic meaning.

Package

clods-export

Source

content.lisp (file)

Macro: with-row (&key REPEAT STYLE VISIBILITY CELL-STYLE) &body BODY

Encloses a single row (or several similar, if the repeat arugment is used) on the table.

Package

clods-export

Source

content.lisp (file)

Macro: with-spreadsheet (FILE &key GENERATOR CREATOR) &body BODY

The main interface macro for CLODS-EXPORT.
Creates a ODS document out of the body of the form and stores it into the specified file. The optional keyword arguments generator and creator are written in the document’s metadata.

Package

clods-export

Source

ods.lisp (file)

Macro: with-table (NAME) &body BODY

Content of a single table (work sheet) on the document.

Package

clods-export

Source

content.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Functions

Function: cell CONTENT &key STYLE FORMULA SPAN-COLUMNS SPAN-ROWS LINK

Write out the contents of a data cell.

The cell may span several columns or rows, and it can contain a
formula or formatted data. The content is formatted according to the
chosen data style (first cell style; if not specified, current row
style; if not specified, current column style; if not specified, an
error is signalled unless content is a string).

The following content types are supported:
* _real_ maps to ODS float, currency, or percentage type, according to the chosen style. * _local-time:timestamp_ maps to ODS date or time type, according to the chosen style. * the keywords :true and :false map to the ODS boolean type
* _string_ is the content as-is, without formatting or numeric value.

Package

clods-export

Source

content.lisp (file)

Function: cell-style NAME PARENT-STYLE TEXT-PROPERTIES &key HORIZONTAL-ALIGN VERTICAL-ALIGN TEXT-ALIGN-SOURCE BACKGROUND BORDER BORDER-LEFT BORDER-TOP BORDER-RIGHT BORDER-BOTTOM WRAP NEXT-STYLE DATA-STYLE PERCENTAGE-DATA-STYLE

Generator for <style:style style:family="table-cell">.

Package

clods-export

Source

styles.lisp (file)

Function: cells &rest CONTENT

A convenience function for writing out a set of cells with no special formatting.

Package

clods-export

Source

content.lisp (file)

Function: column &key REPEAT STYLE VISIBILITY CELL-STYLE

Define a column (or, with the repeat argument, several similar columns).

Package

clods-export

Source

content.lisp (file)

Function: column-style NAME PARENT-STYLE &key WIDTH REL-WIDTH USE-OPTIMAL-WIDTH NEXT-STYLE DATA-STYLE PERCENTAGE-DATA-STYLE

Generator for <style:style style:family="table-column">.

Package

clods-export

Source

styles.lisp (file)

Function: covered-cell &optional N

Write out a set of covered cells.
When a cell spans several columns horizontally, the covered cells are written automatically, but when spanning over rows vertically, the user of the library is responsible of adding the covered cells where the vertical spanning takes place.

Package

clods-export

Source

content.lisp (file)

Function: font NAME &key ADORNMENTS FAMILY FAMILY-GENERIC STYLE WEIGHT SIZE VARIANT STRETCH

Define a font with the given name and specs.
The font can be referenced in style definition using the given name.

Package

clods-export

Source

fonts.lisp (file)

Function: make-locale COUNTRY-CODE GROUPING-SEPARATOR GROUPING-LENGTH DECIMAL-SEPARATOR

Make a new locale with the given ISO 3166 country code, number grouping separator, number grouping length, and decimal separator.

Package

clods-export

Source

locale.lisp (file)

Function: number-boolean-style STYLE-NAME TRUE FALSE &key PREFIX SUFFIX TEXT-PROPERTIES LOCALE

Specify a number:boolean-style. The value is formatted as the strings given in the true and false arguments.

Package

clods-export

Source

styles.lisp (file)

Function: number-currency-style STYLE-NAME FORMAT &key TEXT-PROPERTIES LOCALE

Specify a number:currencty-style.
The format is a plist of the tags :symbol, :text and :number; for
example, ’(:number (:min-integer-digits 1 :decimal-places 2) :text " " :symbol "€").

Package

clods-export

Source

styles.lisp (file)

Function: number-date-style STYLE-NAME FORMAT &key TEXT-PROPERTIES LOCALE

Specify a number:date-style.
The format is a list of the tags :[long/short]-[day/month/year/era/day-of-week/week-of-year/quarter/hours/minutes/seconds/am-pm] and strings, for example ’(:long-year "-" :long-month "-" :long-day).

Package

clods-export

Source

styles.lisp (file)

Function: number-number-style STYLE-NAME FORMAT &key PREFIX SUFFIX TEXT-PROPERTIES LOCALE

Specify a number:number-style. The format is a plist with the following tags:
* :min-integer-digits :number-grouping for all number styles,
* :decimal-replacement :display-factor for normal number styles,
* :decimal-places for normal and scientific styles,
* :min-exponent-digits for scientific styles,
* :denominator-value :min-denominator-digits :min-numerator-digits for fraction styles.

Package

clods-export

Source

styles.lisp (file)

Function: number-percentage-style STYLE-NAME FORMAT &key PREFIX SUFFIX TEXT-PROPERTIES LOCALE

Specify a number:percentage-style. The format is the same as for number-number-style.

Package

clods-export

Source

styles.lisp (file)

Function: number-text-style STYLE-NAME &key PREFIX SUFFIX TEXT-PROPERTIES LOCALE

Specify a number:text-style. Used for simple text content.

Package

clods-export

Source

styles.lisp (file)

Function: number-time-style STYLE-NAME FORMAT &key TEXT-PROPERTIES LOCALE

Specify a number:time-style.
The format is a list of the tags :[long/short]-[hours/minutes/seconds/am-pm] and strings, for example ’(:long-hours ":" :long-minutes ":" :long-seconds).

Package

clods-export

Source

styles.lisp (file)

Function: row-style NAME PARENT-STYLE &key HEIGHT MIN-HEIGHT USE-OPTIMAL-HEIGHT BACKGROUND NEXT-STYLE DATA-STYLE PERCENTAGE-DATA-STYLE

Generator for <style:style style:family="table-row">.

Package

clods-export

Source

styles.lisp (file)

Function: table-style NAME PARENT-STYLE &key WIDTH REL-WIDTH ALIGN BACKGROUND NEXT-STYLE DATA-STYLE PERCENTAGE-DATA-STYLE

Generator for <style:style style:family="table">.

Package

clods-export

Source

styles.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Classes

Class: cell-style ()
Package

clods-export

Source

styles.lisp (file)

Direct superclasses

base-style (class)

Class: column ()
Package

clods-export

Source

content.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: style
Initargs

:style

Readers

col-style (generic function)

Slot: repeat
Initargs

:repeat

Initform

1

Readers

col-repeat (generic function)

Class: column-style ()
Package

clods-export

Source

styles.lisp (file)

Direct superclasses

base-style (class)

Class: number-boolean-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-base-style (class)

Direct methods
Direct slots
Slot: prefix
Initargs

:prefix

Slot: suffix
Initargs

:suffix

Slot: true
Initargs

:true

Slot: false
Initargs

:false

Class: number-currency-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-base-style (class)

Direct methods
Direct slots
Slot: format
Initargs

:format

Class: number-date-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-date-time-style (class)

Direct methods

ods-value-type (method)

Class: number-number-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-base-style (class)

Direct subclasses

number-percentage-style (class)

Direct methods
Direct slots
Slot: format
Initargs

:format

Slot: prefix
Initargs

:prefix

Slot: suffix
Initargs

:suffix

Class: number-percentage-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-number-style (class)

Direct methods
Class: number-text-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-base-style (class)

Direct methods
Direct slots
Slot: prefix
Initargs

:prefix

Slot: suffix
Initargs

:suffix

Class: number-time-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-date-time-style (class)

Direct methods

ods-value-type (method)

Class: row-style ()
Package

clods-export

Source

styles.lisp (file)

Direct superclasses

base-style (class)

Class: table-style ()
Package

clods-export

Source

styles.lisp (file)

Direct superclasses

base-style (class)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *columns*

The set of columns defined for the current document.

Package

clods-export

Source

content.lisp (file)

Special Variable: *current-column*

Track the current column when filling in data.

Package

clods-export

Source

content.lisp (file)

Special Variable: *current-row-style*

Holds the default style specified for the current row.

Package

clods-export

Source

content.lisp (file)

Special Variable: *default-data-style*
Package

clods-export

Source

numbers.lisp (file)

Special Variable: *default-locale*
Package

clods-export

Source

locale.lisp (file)

Special Variable: *last-column*

Pointer to the last cons cell of the columns list, to facilitate appending of new columns.

Package

clods-export

Source

content.lisp (file)

Special Variable: *ns-dc*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-fo*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-meta*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-number*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-of*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-office*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-style*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-svg*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-table*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-text*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *ns-xlink*
Package

clods-export

Source

namespaces.lisp (file)

Special Variable: *sheet-state*

Tracks the state of the document being constructed.
Various forms appearing in a with-spreadsheet form must be specified in the correct order; if the order is violated, an error is signalled.

Package

clods-export

Source

ods.lisp (file)

Special Variable: *styles*

A dictionary of all defined styles in the document.

Package

clods-export

Source

ods.lisp (file)

Special Variable: *text-property-defs*

The set of text properties supported, with the validation rules for their content.

Package

clods-export

Source

text.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Macros

Macro: defnumstyle NAME (&rest ARGS) (&rest INIT-LIST) &body BODY

Helper macro for defining number styles.

Package

clods-export

Source

styles.lisp (file)

Macro: defstyle NAME (&rest ARGS) &body BODY

Helper macro for style:style generators.

Package

clods-export

Source

styles.lisp (file)

Macro: with-ods-namespaces () &body BODY
Package

clods-export

Source

namespaces.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Functions

Function: date-or-time-style DATE-P FORMAT

Helper function for writing out a date or time style.

Package

clods-export

Source

styles.lisp (file)

Function: ensure-style-state ()

Helper function to enforce state on the various style specs.

Package

clods-export

Source

styles.lisp (file)

Function: format-number NUM FMT LOCALE

Format a number according to number formatting flags and the given locale.

Package

clods-export

Source

numbers.lisp (file)

Function: kw-to-string KW &optional ALLOWED

Convert a keyword into a lower-case string.
The optional allowed parameter can be specified to restrict the set of accepted keywords (:kw1 :kw2 ...) and/or to specify different strings for the keywords ((:kw1 "kw1-string") (:kw2 "kw2-string") ...).
A keyword not on the allowed keywords list will signal a type-error.

Package

clods-export

Source

util.lisp (file)

Function: make-ods-manifest ()

Create a manifest document for files in the ODS zip

Package

clods-export

Source

ods.lisp (file)

Function: make-ods-meta GENERATOR CREATOR

Create a meta.xml document, specifying a generator and creator

Package

clods-export

Source

ods.lisp (file)

Function: make-ods-mimetype ()

Create a mimetype file for the ODS zip

Package

clods-export

Source

ods.lisp (file)

Function: make-ods-styles ()

Create an empty styles.xml document

Package

clods-export

Source

ods.lisp (file)

Function: princ-number NUM

princ-to-string a number, enforcing a decimal, non-exponential form.

Package

clods-export

Source

util.lisp (file)

Function: remove-nsec TIME

Remove the nanoseconds part from a local-time generated timestring, e.g. "2015-02-18T08:07:02.000000Z" to "2015-02-18T08:07:02Z"

Package

clods-export

Source

util.lisp (file)

Function: valid-color C

Validate a color specification.
A valid color is a six-digit hexadecimal number preceded by a #.

Package

clods-export

Source

util.lisp (file)

Function: validate-font-weight X

Check that the given datum is a valid font weight.

Package

clods-export

Source

text.lisp (file)

Function: write-background BACKGROUND

Helper function for writing the background color specification.

Package

clods-export

Source

styles.lisp (file)

Function: write-col-row-attrs REPEAT STYLE VISIBILITY CELL-STYLE

Helper function for writing out attributes that are common to rows and columns.

Package

clods-export

Source

content.lisp (file)

Function: write-number-number SPEC &key NORMAL-ONLY

Helper function to write out a number specification.
Type of the number (normal/scientific/fraction) is deduced from the flags.

Package

clods-export

Source

styles.lisp (file)

Function: write-text-properties PROPS

Write a list containing text properties into the XML document.

Package

clods-export

Source

text.lisp (file)

Function: zip-ods OUT FILES

Package a set of files into a zip archive

Package

clods-export

Source

ods.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Generic functions

Generic Function: col-repeat OBJECT
Package

clods-export

Methods
Method: col-repeat (COLUMN column)

automatically generated reader method

Source

content.lisp (file)

Generic Function: col-style OBJECT
Package

clods-export

Methods
Method: col-style (COLUMN column)

automatically generated reader method

Source

content.lisp (file)

Generic Function: decimal-separator OBJECT
Package

clods-export

Methods
Method: decimal-separator (LOCALE locale)

automatically generated reader method

Source

locale.lisp (file)

Generic Function: format-data STYLE DATA

Format data according to a number-*-style.

Package

clods-export

Source

numbers.lisp (file)

Methods
Method: format-data (STYLE number-text-style) DATA
Method: format-data (STYLE number-percentage-style) DATA
Method: format-data (STYLE number-number-style) DATA
Method: format-data (STYLE number-date-time-style) DATA
Method: format-data (STYLE number-currency-style) DATA
Method: format-data (STYLE number-boolean-style) DATA
Generic Function: grouping-count OBJECT
Package

clods-export

Methods
Method: grouping-count (LOCALE locale)

automatically generated reader method

Source

locale.lisp (file)

Generic Function: grouping-separator OBJECT
Package

clods-export

Methods
Method: grouping-separator (LOCALE locale)

automatically generated reader method

Source

locale.lisp (file)

Generic Function: locale-country OBJECT
Package

clods-export

Methods
Method: locale-country (LOCALE locale)

automatically generated reader method

Source

locale.lisp (file)

Generic Function: ods-value-type STYLE

Retrieve the ODS value-type for the number-*-style.

Package

clods-export

Source

numbers.lisp (file)

Methods
Method: ods-value-type (STYLE number-text-style)
Method: ods-value-type (STYLE number-percentage-style)
Method: ods-value-type (STYLE number-number-style)
Method: ods-value-type (STYLE number-time-style)
Method: ods-value-type (STYLE number-date-style)
Method: ods-value-type (STYLE number-currency-style)
Method: ods-value-type (STYLE number-boolean-style)
Generic Function: style-name OBJECT
Package

clods-export

Methods
Method: style-name (BASE-STYLE base-style)

automatically generated reader method

Source

styles.lisp (file)

Method: style-name (NUMBER-BASE-STYLE number-base-style)

automatically generated reader method

Source

numbers.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Classes

Class: base-style ()
Package

clods-export

Source

styles.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

style-name (generic function)

Slot: data-style
Initargs

:data-style

Slot: %-data-style
Initargs

:%-data-style

Class: locale ()
Package

clods-export

Source

locale.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: country
Initargs

:country

Readers

locale-country (generic function)

Slot: grouping-separator
Initargs

:grouping-separator

Readers

grouping-separator (generic function)

Slot: grouping-count
Initargs

:grouping-count

Readers

grouping-count (generic function)

Slot: decimal-separator
Initargs

:decimal-separator

Initform

#\full_stop

Readers

decimal-separator (generic function)

Class: number-base-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

style-name (generic function)

Slot: locale
Initargs

:locale

Class: number-date-time-style ()
Package

clods-export

Source

numbers.lisp (file)

Direct superclasses

number-base-style (class)

Direct subclasses
Direct methods

format-data (method)

Direct slots
Slot: format
Initargs

:format


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
clods-export.asd: The clods-export<dot>asd file
clods-export/clods: The clods-export/clods module
clods-export/clods/content.lisp: The clods-export/clods/content<dot>lisp file
clods-export/clods/fonts.lisp: The clods-export/clods/fonts<dot>lisp file
clods-export/clods/locale.lisp: The clods-export/clods/locale<dot>lisp file
clods-export/clods/namespaces.lisp: The clods-export/clods/namespaces<dot>lisp file
clods-export/clods/numbers.lisp: The clods-export/clods/numbers<dot>lisp file
clods-export/clods/ods.lisp: The clods-export/clods/ods<dot>lisp file
clods-export/clods/package.lisp: The clods-export/clods/package<dot>lisp file
clods-export/clods/styles.lisp: The clods-export/clods/styles<dot>lisp file
clods-export/clods/text.lisp: The clods-export/clods/text<dot>lisp file
clods-export/clods/util.lisp: The clods-export/clods/util<dot>lisp file

F
File, Lisp, clods-export.asd: The clods-export<dot>asd file
File, Lisp, clods-export/clods/content.lisp: The clods-export/clods/content<dot>lisp file
File, Lisp, clods-export/clods/fonts.lisp: The clods-export/clods/fonts<dot>lisp file
File, Lisp, clods-export/clods/locale.lisp: The clods-export/clods/locale<dot>lisp file
File, Lisp, clods-export/clods/namespaces.lisp: The clods-export/clods/namespaces<dot>lisp file
File, Lisp, clods-export/clods/numbers.lisp: The clods-export/clods/numbers<dot>lisp file
File, Lisp, clods-export/clods/ods.lisp: The clods-export/clods/ods<dot>lisp file
File, Lisp, clods-export/clods/package.lisp: The clods-export/clods/package<dot>lisp file
File, Lisp, clods-export/clods/styles.lisp: The clods-export/clods/styles<dot>lisp file
File, Lisp, clods-export/clods/text.lisp: The clods-export/clods/text<dot>lisp file
File, Lisp, clods-export/clods/util.lisp: The clods-export/clods/util<dot>lisp file

L
Lisp File, clods-export.asd: The clods-export<dot>asd file
Lisp File, clods-export/clods/content.lisp: The clods-export/clods/content<dot>lisp file
Lisp File, clods-export/clods/fonts.lisp: The clods-export/clods/fonts<dot>lisp file
Lisp File, clods-export/clods/locale.lisp: The clods-export/clods/locale<dot>lisp file
Lisp File, clods-export/clods/namespaces.lisp: The clods-export/clods/namespaces<dot>lisp file
Lisp File, clods-export/clods/numbers.lisp: The clods-export/clods/numbers<dot>lisp file
Lisp File, clods-export/clods/ods.lisp: The clods-export/clods/ods<dot>lisp file
Lisp File, clods-export/clods/package.lisp: The clods-export/clods/package<dot>lisp file
Lisp File, clods-export/clods/styles.lisp: The clods-export/clods/styles<dot>lisp file
Lisp File, clods-export/clods/text.lisp: The clods-export/clods/text<dot>lisp file
Lisp File, clods-export/clods/util.lisp: The clods-export/clods/util<dot>lisp file

M
Module, clods-export/clods: The clods-export/clods module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   E   F   G   K   L   M   N   O   P   R   S   T   U   V   W   Z  
Index Entry  Section

C
cell: Exported functions
cell-style: Exported functions
cells: Exported functions
col-repeat: Internal generic functions
col-repeat: Internal generic functions
col-style: Internal generic functions
col-style: Internal generic functions
column: Exported functions
column-style: Exported functions
covered-cell: Exported functions

D
date-or-time-style: Internal functions
decimal-separator: Internal generic functions
decimal-separator: Internal generic functions
defnumstyle: Internal macros
defstyle: Internal macros

E
ensure-style-state: Internal functions

F
font: Exported functions
format-data: Internal generic functions
format-data: Internal generic functions
format-data: Internal generic functions
format-data: Internal generic functions
format-data: Internal generic functions
format-data: Internal generic functions
format-data: Internal generic functions
format-number: Internal functions
Function, cell: Exported functions
Function, cell-style: Exported functions
Function, cells: Exported functions
Function, column: Exported functions
Function, column-style: Exported functions
Function, covered-cell: Exported functions
Function, date-or-time-style: Internal functions
Function, ensure-style-state: Internal functions
Function, font: Exported functions
Function, format-number: Internal functions
Function, kw-to-string: Internal functions
Function, make-locale: Exported functions
Function, make-ods-manifest: Internal functions
Function, make-ods-meta: Internal functions
Function, make-ods-mimetype: Internal functions
Function, make-ods-styles: Internal functions
Function, number-boolean-style: Exported functions
Function, number-currency-style: Exported functions
Function, number-date-style: Exported functions
Function, number-number-style: Exported functions
Function, number-percentage-style: Exported functions
Function, number-text-style: Exported functions
Function, number-time-style: Exported functions
Function, princ-number: Internal functions
Function, remove-nsec: Internal functions
Function, row-style: Exported functions
Function, table-style: Exported functions
Function, valid-color: Internal functions
Function, validate-font-weight: Internal functions
Function, write-background: Internal functions
Function, write-col-row-attrs: Internal functions
Function, write-number-number: Internal functions
Function, write-text-properties: Internal functions
Function, zip-ods: Internal functions

G
Generic Function, col-repeat: Internal generic functions
Generic Function, col-style: Internal generic functions
Generic Function, decimal-separator: Internal generic functions
Generic Function, format-data: Internal generic functions
Generic Function, grouping-count: Internal generic functions
Generic Function, grouping-separator: Internal generic functions
Generic Function, locale-country: Internal generic functions
Generic Function, ods-value-type: Internal generic functions
Generic Function, style-name: Internal generic functions
grouping-count: Internal generic functions
grouping-count: Internal generic functions
grouping-separator: Internal generic functions
grouping-separator: Internal generic functions

K
kw-to-string: Internal functions

L
locale-country: Internal generic functions
locale-country: Internal generic functions

M
Macro, defnumstyle: Internal macros
Macro, defstyle: Internal macros
Macro, using-fonts: Exported macros
Macro, using-styles: Exported macros
Macro, with-body: Exported macros
Macro, with-header-columns: Exported macros
Macro, with-header-rows: Exported macros
Macro, with-ods-namespaces: Internal macros
Macro, with-row: Exported macros
Macro, with-spreadsheet: Exported macros
Macro, with-table: Exported macros
make-locale: Exported functions
make-ods-manifest: Internal functions
make-ods-meta: Internal functions
make-ods-mimetype: Internal functions
make-ods-styles: Internal functions
Method, col-repeat: Internal generic functions
Method, col-style: Internal generic functions
Method, decimal-separator: Internal generic functions
Method, format-data: Internal generic functions
Method, format-data: Internal generic functions
Method, format-data: Internal generic functions
Method, format-data: Internal generic functions
Method, format-data: Internal generic functions
Method, format-data: Internal generic functions
Method, grouping-count: Internal generic functions
Method, grouping-separator: Internal generic functions
Method, locale-country: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, ods-value-type: Internal generic functions
Method, style-name: Internal generic functions
Method, style-name: Internal generic functions

N
number-boolean-style: Exported functions
number-currency-style: Exported functions
number-date-style: Exported functions
number-number-style: Exported functions
number-percentage-style: Exported functions
number-text-style: Exported functions
number-time-style: Exported functions

O
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions
ods-value-type: Internal generic functions

P
princ-number: Internal functions

R
remove-nsec: Internal functions
row-style: Exported functions

S
style-name: Internal generic functions
style-name: Internal generic functions
style-name: Internal generic functions

T
table-style: Exported functions

U
using-fonts: Exported macros
using-styles: Exported macros

V
valid-color: Internal functions
validate-font-weight: Internal functions

W
with-body: Exported macros
with-header-columns: Exported macros
with-header-rows: Exported macros
with-ods-namespaces: Internal macros
with-row: Exported macros
with-spreadsheet: Exported macros
with-table: Exported macros
write-background: Internal functions
write-col-row-attrs: Internal functions
write-number-number: Internal functions
write-text-properties: Internal functions

Z
zip-ods: Internal functions

Jump to:   C   D   E   F   G   K   L   M   N   O   P   R   S   T   U   V   W   Z  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   %   *  
C   D   F   G   L   N   P   R   S   T  
Index Entry  Section

%
%-data-style: Internal classes

*
*columns*: Internal special variables
*current-column*: Internal special variables
*current-row-style*: Internal special variables
*default-data-style*: Internal special variables
*default-locale*: Internal special variables
*font-generic-families*: Exported special variables
*font-pitches*: Exported special variables
*font-reliefs*: Exported special variables
*font-sizes*: Exported special variables
*font-stretches*: Exported special variables
*font-styles*: Exported special variables
*font-variants*: Exported special variables
*font-weights*: Exported special variables
*last-column*: Internal special variables
*line-modes*: Exported special variables
*line-styles*: Exported special variables
*line-types*: Exported special variables
*line-widths*: Exported special variables
*ns-dc*: Internal special variables
*ns-fo*: Internal special variables
*ns-meta*: Internal special variables
*ns-number*: Internal special variables
*ns-of*: Internal special variables
*ns-office*: Internal special variables
*ns-style*: Internal special variables
*ns-svg*: Internal special variables
*ns-table*: Internal special variables
*ns-text*: Internal special variables
*ns-xlink*: Internal special variables
*script-types*: Exported special variables
*sheet-state*: Internal special variables
*styles*: Internal special variables
*text-properties*: Exported special variables
*text-property-defs*: Internal special variables
*text-transforms*: Exported special variables

C
country: Internal classes

D
data-style: Internal classes
decimal-separator: Internal classes

F
false: Exported classes
format: Exported classes
format: Exported classes
format: Internal classes

G
grouping-count: Internal classes
grouping-separator: Internal classes

L
locale: Internal classes

N
name: Internal classes
name: Internal classes

P
prefix: Exported classes
prefix: Exported classes
prefix: Exported classes

R
repeat: Exported classes

S
Slot, %-data-style: Internal classes
Slot, country: Internal classes
Slot, data-style: Internal classes
Slot, decimal-separator: Internal classes
Slot, false: Exported classes
Slot, format: Exported classes
Slot, format: Exported classes
Slot, format: Internal classes
Slot, grouping-count: Internal classes
Slot, grouping-separator: Internal classes
Slot, locale: Internal classes
Slot, name: Internal classes
Slot, name: Internal classes
Slot, prefix: Exported classes
Slot, prefix: Exported classes
Slot, prefix: Exported classes
Slot, repeat: Exported classes
Slot, style: Exported classes
Slot, suffix: Exported classes
Slot, suffix: Exported classes
Slot, suffix: Exported classes
Slot, true: Exported classes
Special Variable, *columns*: Internal special variables
Special Variable, *current-column*: Internal special variables
Special Variable, *current-row-style*: Internal special variables
Special Variable, *default-data-style*: Internal special variables
Special Variable, *default-locale*: Internal special variables
Special Variable, *font-generic-families*: Exported special variables
Special Variable, *font-pitches*: Exported special variables
Special Variable, *font-reliefs*: Exported special variables
Special Variable, *font-sizes*: Exported special variables
Special Variable, *font-stretches*: Exported special variables
Special Variable, *font-styles*: Exported special variables
Special Variable, *font-variants*: Exported special variables
Special Variable, *font-weights*: Exported special variables
Special Variable, *last-column*: Internal special variables
Special Variable, *line-modes*: Exported special variables
Special Variable, *line-styles*: Exported special variables
Special Variable, *line-types*: Exported special variables
Special Variable, *line-widths*: Exported special variables
Special Variable, *ns-dc*: Internal special variables
Special Variable, *ns-fo*: Internal special variables
Special Variable, *ns-meta*: Internal special variables
Special Variable, *ns-number*: Internal special variables
Special Variable, *ns-of*: Internal special variables
Special Variable, *ns-office*: Internal special variables
Special Variable, *ns-style*: Internal special variables
Special Variable, *ns-svg*: Internal special variables
Special Variable, *ns-table*: Internal special variables
Special Variable, *ns-text*: Internal special variables
Special Variable, *ns-xlink*: Internal special variables
Special Variable, *script-types*: Exported special variables
Special Variable, *sheet-state*: Internal special variables
Special Variable, *styles*: Internal special variables
Special Variable, *text-properties*: Exported special variables
Special Variable, *text-property-defs*: Internal special variables
Special Variable, *text-transforms*: Exported special variables
style: Exported classes
suffix: Exported classes
suffix: Exported classes
suffix: Exported classes

T
true: Exported classes

Jump to:   %   *  
C   D   F   G   L   N   P   R   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   L   N   P   R   S   T  
Index Entry  Section

B
base-style: Internal classes

C
cell-style: Exported classes
Class, base-style: Internal classes
Class, cell-style: Exported classes
Class, column: Exported classes
Class, column-style: Exported classes
Class, locale: Internal classes
Class, number-base-style: Internal classes
Class, number-boolean-style: Exported classes
Class, number-currency-style: Exported classes
Class, number-date-style: Exported classes
Class, number-date-time-style: Internal classes
Class, number-number-style: Exported classes
Class, number-percentage-style: Exported classes
Class, number-text-style: Exported classes
Class, number-time-style: Exported classes
Class, row-style: Exported classes
Class, table-style: Exported classes
clods-export: The clods-export system
clods-export: The clods-export package
clods-export-system: The clods-export-system package
column: Exported classes
column-style: Exported classes

L
locale: Internal classes

N
number-base-style: Internal classes
number-boolean-style: Exported classes
number-currency-style: Exported classes
number-date-style: Exported classes
number-date-time-style: Internal classes
number-number-style: Exported classes
number-percentage-style: Exported classes
number-text-style: Exported classes
number-time-style: Exported classes

P
Package, clods-export: The clods-export package
Package, clods-export-system: The clods-export-system package

R
row-style: Exported classes

S
System, clods-export: The clods-export system

T
table-style: Exported classes

Jump to:   B   C   L   N   P   R   S   T