Elixlsx.XMLTemplates (elixlsx v0.6.0) View Source

Link to this section Summary

Functions

Returns the XML content for single sheet.

Return the data for /xl/workbook.xml

Get the content of the styles.xml file.

There are 5 characters that should be escaped in XML (<,>,",',&), but only 2 of them must be escaped. Saves a couple of CPU cycles, for the environment.

Escape characters for embedding in XML documents.

Link to this section Functions

Link to this function

docprops_core(timestamp, language \\ "en-US", revision \\ 1)

View Source
Link to this function

make_contenttypes_xml(wci)

View Source

Specs

Returns the XML content for single sheet.

Link to this function

make_workbook_xml(data, sci)

View Source

Return the data for /xl/workbook.xml

Link to this function

make_xl_rel_sheet(sheet_comp_info)

View Source

Specs

make_xl_rel_sheet(Elixlsx.Compiler.SheetCompInfo.t()) :: String.t()
Link to this function

make_xl_rel_sheets(sheet_comp_infos)

View Source

Specs

make_xl_rel_sheets([Elixlsx.Compiler.SheetCompInfo.t(), ...]) :: String.t()
Link to this function

make_xl_shared_strings(stringlist)

View Source

Specs

make_xl_shared_strings([{non_neg_integer(), String.t()}]) :: String.t()

Specs

Get the content of the styles.xml file.

The WorkbookCompInfo struct must be computed before calling this, (especially CellStyleDB.register_all)

Link to this function

make_xl_workbook_xml_sheet_entry(arg)

View Source

Specs

make_xl_workbook_xml_sheet_entry(
  {Elixlsx.Sheet.t(), Elixlsx.Compiler.SheetCompInfo.t()}
) ::
  String.t()
Link to this function

minimal_xml_text_escape(s)

View Source

There are 5 characters that should be escaped in XML (<,>,",',&), but only 2 of them must be escaped. Saves a couple of CPU cycles, for the environment.

Examples

iex> Elixlsx.XMLTemplates.minimal_xml_text_escape "Only '&' and '<' are escaped here, '\"' & '>' & \"'\" are not."
"Only '&amp;' and '&lt;' are escaped here, '\"' &amp; '>' &amp; \"'\" are not."

Escape characters for embedding in XML documents.

Examples

iex> Elixlsx.XMLTemplates.xml_escape "&\"'<>'"
"&amp;&quot;&apos;&lt;&gt;&apos;"