Xlsxir v1.6.4 Xlsxir.ParseStyle View Source

Holds the SAX event instructions for parsing style data via Xlsxir.SaxParser.parse/2

Link to this section Summary

Functions

Sax event utilized by Xlsxir.SaxParser.parse/2. Takes a pattern and the current state of a struct and recursivly parses the styles XML file, ultimately saving each parsed style type to the ETS process. The style types generated are nil for numbers and 'd' for dates

Link to this section Functions

Link to this function

sax_event_handler(arg1, state) View Source

Sax event utilized by Xlsxir.SaxParser.parse/2. Takes a pattern and the current state of a struct and recursivly parses the styles XML file, ultimately saving each parsed style type to the ETS process. The style types generated are nil for numbers and 'd' for dates.

Parameters

  • pattern - the XML pattern of the event to match upon
  • state - the state of the %Xlsxir.ParseStyle{} struct which temporarily holds each numFmtId and its associated formatCode for custom format types

Example

Recursively sends style types generated from parsing the xl/sharedStrings.xml file to ETS process. The data can ultimately be retreived from the ETS table (i.e. :ets.lookup(tid, 0) would return nil or 'd' depending on each style type generated).