Xlsxir v1.2.0 Xlsxir.ParseStyle

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

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 sending each parsed style type to the Xlsxir.Style module which contains an ETS process that was started by Xlsxir.SaxParser.parse/2. The style types generated are nil for numbers and 'd' for dates

Functions

sax_event_handler(arg1, state)

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 sending each parsed style type to the Xlsxir.Style module which contains an ETS process that was started by Xlsxir.SaxParser.parse/2. 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 Style.add_style/1. The data can ultimately be retreived by the get_at/1 function of the Xlsxir.Style module (i.e. Xlsxir.Style.get_at(0) would return nil or 'd' depending on each style type generated).