CreateExcel(sheets, outputName?, options?) : Resource?
Creates Excel file as memory resource.
Each value can be a dict with Value property and any of the following styles:
Width, Color, BgColor, BgFill, Size (font size), Bold, Italic, Wrap, Align, VAlign, Border{Left,Right,Top,Bottom}(Color,Style), NumberFormat.
CreateExcel Parameters
sheets : Dict?
Dictionary sheetName -> [] (each array item is a row, i.e. array of cells).
outputName? : String?
Output resource file name.
options? : Dict?
Supports AutoHeader, AutoFit, Freeze (‘row col’), StyleFirstRow, or any style property.
CreateExcel Examples
var rows = 64; var cols = 16;
var excel = CreateExcel({
Sheet = Repeat(rows, row => Repeat(cols, col => {
Value = (row - 1) * cols + col,
BgColor = "#{row*255/rows -> (-2,,0)x}{col*255/cols -> (-2,,0)x}{((row-1)*cols+col)*255/(rows*cols) -> (-2,,0)x}"
}))
});
CreateSlides(slides, outputName?) : Resource?
Creates Powerpoint slides file as memory resource.
CreateSlides Parameters
slides : Binary[]?
Array of images to become slides (SVG, PNG, WMF, EMF formats are supported).
outputName? : String?
Output resource file name.
DocMerge(documents, outputName?) : Resource?
Merges several documents into one (currently PDF only).
DocMerge Parameters
documents : []
Documents to merge.
outputName? : String?
Output resource file name.
DocProtect(document, password?) : Resource?
Protects document from modifications using password.
DocProtect Parameters
document : Resource?
Document to protect.
password? : String?
Password for protection.
DocToDocx(document, outputName?) : Resource?
Converts document (PDF) to Word docx.
DocToDocx Parameters
document : Resource?
Document to convert.
outputName? : String?
Output resource file name.
DocToEml(document, from?, to?, subject?, outputName?, attachment?, cc?, bcc?, options?) : Resource?
Alias: ConvertDocumentToEml
Converts document (HTML, Word, Excel) to EML.
DocToEml Parameters
document : Resource?
Document to convert.
from? : String?
to? : String?
subject? : String?
outputName? : String?
Output resource file name.
attachment? : Resource?
cc? : String?
bcc? : String?
options? : Dict?
DocToExcel(document, outputName?, options?) : Resource?
Converts document (PDF) to Excel.
DocToExcel Parameters
document : Resource?
Document to convert.
outputName? : String?
Output resource file name.
options? : Dict?
Conversion options (Format=XLSX|CSV|ODS, SheetPerPage=false, OnlyTables=false).
DocToHtml(document, outputName?, options?) : Resource?
Alias: ConvertDocumentToHtml
Converts document (Word, Excel, PDF) to HTML.
DocToHtml Parameters
document : Resource?
Document to convert.
outputName? : String?
Output resource file name.
options? : Dict?
Save options.
DocToImages(document, options?, outputName?) : Resource?
Converts document (Pdf, Pptx) to series of images (one per page).
DocToImages Parameters
document : Resource?
Document to convert.
options? : Dict?
Resolution, etc.
outputName? : String?
Output resource file name.
DocToPdf(document, outputName?) : Resource?
Alias: ConvertDocumentToPdf
Converts document (Word, Excel) to PDF.
DocToPdf Parameters
document : Resource?
Document to convert.
outputName? : String?
Output resource file name.
Excel(resource, password?, trimSpaces = false) : ExcelFile
Parses an Excel file.
Excel Parameters
resource : Resource?
Excel file resource (xls, xlsx, csv, ods).
password? : String?
trimSpaces : Boolean = false
True to trim start/end spaces for all cell values.
Excel Examples
var rows = File('res:///internal/data.xlsx').Excel().Sheets.First().Value.Rows;
ExtractTables(document, startPage = 1, skip = 0, limit = 0, trimSpaces = false, skipEmptyRows = false) : []
Extracts tables from document.
PDF files are supported.
ExtractTables Parameters
document : Resource?
PDF document with tables.
startPage : int = 1
Start page index.
skip : int = 0
Number of tables to skip.
limit : int = 0
Limit number of tables to extract (0 – extract all).
trimSpaces : Boolean = false
True to trim start/end spaces for all cell values.
skipEmptyRows : Boolean = false
True to skip rows where all cells are empty.
ExtractText(document) : String?
Extracts plain text from a document (Word, Excel, PDF, HTML).
ExtractText Parameters
document : Resource?
GetDocVars(template, removeTables = false) : []
Lists document variables.
Microsoft Word documents and PDF files are supported.
GetDocVars Parameters
template : Resource?
removeTables : Boolean = false
True to skip table variables.
GoogleSheets(config, sheetId, range?, data?) : ?
Read/Write Google Sheets data
GoogleSheets Parameters
config : String
Google drive config to use (the config is shared with Sheets)
sheetId : String
Sheet id.
range? : String?
Omit to get list of sheets, or provide range to read/update.
data? : array?
Data to write to the target range.
PdfAnnotationsToFields(document, outputName?) : Resource?
Creates PDF form fields from annotations.
Author is options list in form ‘key=value|key=value|…|’.
PdfAnnotationsToFields Parameters
document : Resource?
PDF document with annotations.
outputName? : String?
Output resource file name.
ReadEml(document) : Dict?
Read .eml email message fields
ReadEml Parameters
document : Resource?
Document to read.
SubstituteDocVars(document, variables, outputName?, allowMissingVars = false) : Resource?
Alias: SubstituteDocumentVars
Substitutes document variables with values.
Microsoft Word documents and PDF files are supported.
PDF annotations can serve as fields (author there is options list in form ‘key=value|key=value|…|’).
SubstituteDocVars Parameters
document : Resource?
variables : Dict?
Variables to substitute in the template document.
outputName? : String?
Output resource file name.
allowMissingVars : Boolean = false
True to not throw errors if not all variables in the document are provided.