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
Specs
make_sheet(Elixlsx.Sheet.t(), Elixlsx.Compiler.WorkbookCompInfo.t()) :: String.t()
Returns the XML content for single sheet.
Return the data for /xl/workbook.xml
Specs
make_xl_rel_sheet(Elixlsx.Compiler.SheetCompInfo.t()) :: String.t()
Specs
make_xl_rel_sheets([Elixlsx.Compiler.SheetCompInfo.t(), ...]) :: String.t()
Specs
make_xl_styles(Elixlsx.Compiler.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)
Specs
make_xl_workbook_xml_sheet_entry( {Elixlsx.Sheet.t(), Elixlsx.Compiler.SheetCompInfo.t()} ) :: String.t()
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 '&' and '<' are escaped here, '\"' & '>' & \"'\" are not."
Escape characters for embedding in XML documents.
Examples
iex> Elixlsx.XMLTemplates.xml_escape "&\"'<>'"
"&"'<>'"