elixlsx v0.0.3 Elixlsx.XMLTemplates

Summary

Functions

Returns the XML content for single sheet

Return the data for /xl/workbook.xml

get the content of the styles.xml file. the WorkbookCompInfo struct must be computed before calling this, (especially CellStyleDB.register_all)

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

Functions

docprops_app()
docprops_core(timestamp, language \\ "en-US", revision \\ 1)
make_contenttypes_xml(wci)
make_sheet(sheet, wci)

Specs

make_sheet(Sheet.t, WorkbookCompInfo.t) :: String.t

Returns the XML content for single sheet.

make_workbook_xml(data, sci)

Return the data for /xl/workbook.xml

make_xl_rel_sheet(sheet_comp_info)

Specs

make_xl_rel_sheets(sheet_comp_infos)

Specs

make_xl_rel_sheets([Elixlsx.Compiler.SheetCompInfo.t, ...]) :: String.t
make_xl_shared_strings(stringlist)

Specs

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

Specs

make_xl_styles(WorkbookCompInfo.t) :: String.t

get the content of the styles.xml file. the WorkbookCompInfo struct must be computed before calling this, (especially CellStyleDB.register_all)

make_xl_workbook_xml_sheet_entry(arg)

Specs

make_xl_workbook_xml_sheet_entry({Sheet.t, Elixlsx.Compiler.SheetCompInfo.t}) :: String.t
minimal_xml_text_escape(s)

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.

Example

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."
rels_dotrels()
xml_escape(s)

Escape characters for embedding in XML documents.

Example

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