BotreamDocs Website Türkçe v0.1.1

Data commands

excel · xml · json · csv · pdf · database

excel Excel

Reads and writes Excel workbooks: .xlsx files directly (Excel does not need to be installed), or through an installed Microsoft Excel with --engine:excel (any format Excel opens, macros, refreshing data, PDF export).

Actions (--action)

--action:open
ParameterValueDefaultDescription
--file requiredtextA file on the agent machine.
--session requiredtextName for this workbook, used by the following excel commands
--sheettextSheet to activate
--createtrue / falsefalseCreate the file when it does not exist
--engineone of file, excelfilefile: reads and writes the .xlsx file itself (no Excel needed); excel: drives Microsoft Excel on the agent machine (needed for runmacro, refreshall, exportpdf and autofit; formulas are calculated by Excel)
--visibletrue / falsetrueWith --engine:excel: show the Excel window while the task works
--action:readcell
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--col requiredany value
--row requirednumber
--output requiredvariable nameVariable that receives the result
--action:writeformula

Puts a formula into a cell; readcell then gives its calculated value.

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--col requiredany value
--row requirednumber
--formula requiredtextAn Excel formula, e.g. =SUM(C2:C10) (written to the cell as it is, not calculated by Botream)
--action:find

The cells holding a value, top to bottom, as records (Row, Column, ColumnLetter, Address, Value); an empty list when there is none.

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--value requiredany valueValue to look for (compared as text, ignoring case)
--colany valueSearch only this column (letter or number)
--matchone of exact, containsexact
--output requiredvariable nameVariable that receives the result
--action:writecell
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--col requiredany value
--row requirednumber
--value requiredany value
--action:readrow
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--row requirednumber
--output requiredvariable nameVariable that receives the result
--action:writerow
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--row requirednumber
--data required$variable$
--action:readcolumn
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--col requiredany value
--output requiredvariable nameVariable that receives the result
--action:readrange

The cells as a data table whose columns are the first row; with --header:false a list of rows (each a list of values).

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--rangetexte.g. A1:D10; defaults to the used range
--headertrue / falsetrueFirst row holds column names (rows become records)
--output requiredvariable nameVariable that receives the result
--action:writerange

Writes a data table (its column names first), a list of records or a list of lists, starting at --range.

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--range requiredtextTop-left cell, e.g. A1
--data required$variable$
--headertrue / falsetrueWrite column names first (for record rows)
--action:formatcell
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--range requiredtextCell or range, e.g. B2 or A1:D1
--boldtrue / false
--italictrue / false
--fontsizenumber
--fontcolortextHex color, e.g. #FF0000
--backcolortextHex color, e.g. #FFFF00
--numberformattexte.g. 0.00 or dd.MM.yyyy
--action:deleterow
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--row requirednumber
--action:insertrow
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--row requirednumber
--data$variable$
--action:getrowcount
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--output requiredvariable nameVariable that receives the result
--action:getcolumncount
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--output requiredvariable nameVariable that receives the result
--action:getsheets
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--output requiredvariable nameVariable that receives the result
--action:createsheet
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--sheet requiredtext
--action:deletesheet
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--sheet requiredtext
--action:activatesheet
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--sheet requiredtext
--action:save
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--action:saveas
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--file requiredtextA file on the agent machine.
--action:close
ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--savetrue / falsefalseSave changes before closing
--action:runmacro

Runs a VBA macro of the workbook (needs --engine:excel); --output receives what a Function returns.

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--macro requiredtextThe macro, e.g. Module1.FixFormats or FixFormats
--argsany valueValues passed to the macro: a list variable or comma-separated values
--outputvariable nameVariable that receives the result
--action:refreshall

Refreshes every data connection, query and pivot table of the workbook and waits until they are done (needs --engine:excel).

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--action:exportpdf

Saves the active sheet or the whole workbook as a PDF (needs --engine:excel).

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--file requiredtextThe PDF to write, e.g. C:\Reports\Sales.pdf A file on the agent machine.
--scopeone of sheet, workbooksheetsheet: the active sheet; workbook: every sheet
--action:autofit

Makes the columns as wide as their contents (needs --engine:excel).

ParameterValueDefaultDescription
--session requiredtextSession name given when the workbook was opened Names a excel session opened earlier.
--rangetextColumns or cells, e.g. A:D; the used range when empty

Examples

excel --action:open --file:"C:\data.xlsx" --session:Invoices --sheet:"Sheet1"
excel --action:readcell --session:Invoices --row:1 --col:2 --output:cellValue
excel --action:writecell --session:Invoices --row:1 --col:2 --value:"Updated"
excel --action:writeformula --session:Invoices --row:10 --col:C --formula:"=SUM(C2:C9)"
excel --action:find --session:Invoices --value:$orderNo$ --col:A --match:exact --output:cells
excel --action:readrow --session:Invoices --row:1 --output:rowData
excel --action:writerow --session:Invoices --row:1 --data:$rowRecord$
excel --action:readcolumn --session:Invoices --col:"A" --output:colData
excel --action:readrange --session:Invoices --range:"A1:D10" --output:tableData
excel --action:writerange --session:Invoices --range:"A1" --data:$dataTable$
excel --action:deleterow --session:Invoices --row:5
excel --action:insertrow --session:Invoices --row:3 --data:$rowRecord$
excel --action:getrowcount --session:Invoices --output:rowCount
excel --action:getcolumncount --session:Invoices --output:colCount
excel --action:createsheet --session:Invoices --sheet:"NewSheet"
excel --action:deletesheet --session:Invoices --sheet:"OldSheet"
excel --action:activatesheet --session:Invoices --sheet:"Sheet2"
excel --action:getsheets --session:Invoices --output:sheetList
excel --action:save --session:Invoices
excel --action:saveas --session:Invoices --file:"C:\output.xlsx"
excel --action:close --session:Invoices
excel --action:open --file:"C:\Reports\Sales.xlsm" --session:Sales --engine:excel --visible:false
excel --action:refreshall --session:Sales
excel --action:runmacro --session:Sales --macro:"Module1.FormatReport" --args:"2026, 10" --output:macroResult
excel --action:autofit --session:Sales --range:"A:F"
excel --action:exportpdf --session:Sales --file:"C:\Reports\Sales.pdf" --scope:workbook
excel --action:close --session:Sales --save:true

xml XML

Reads and edits XML documents with XPath.

Actions (--action)

--action:open
ParameterValueDefaultDescription
--file requiredtextA file on the agent machine.
--session requiredtextName for this document, used by the following xml commands
--action:create
ParameterValueDefaultDescription
--session requiredtextName for this document, used by the following xml commands
--roottextRoot element name
--texttextXML text to load instead of an empty document
--action:getvalue
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--output requiredvariable nameVariable that receives the result
--action:setvalue
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--value requiredany value
--action:getattribute
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--attribute requiredtext
--output requiredvariable nameVariable that receives the result
--action:setattribute
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--attribute requiredtext
--value requiredany value
--action:removeattribute
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--attribute requiredtext
--action:getnodes
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--output requiredvariable nameVariable that receives the result
--action:count
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--output requiredvariable nameVariable that receives the result
--action:addnode
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextParent element XPath
--name requiredtextNew element name
--valueany value
--action:deletenode
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpath requiredtextXPath, e.g. /Orders/Order[@id="7"]/Total
--action:getxml
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--xpathtextElement to return; whole document when empty
--output requiredvariable nameVariable that receives the result
--action:save
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--action:saveas
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--file requiredtextA file on the agent machine.
--action:close
ParameterValueDefaultDescription
--session requiredtextSession name given when the document was opened Names a xml session opened earlier.
--savetrue / falsefalseSave changes before closing

Examples

xml --action:open --file:"C:\orders.xml" --session:Orders
xml --action:create --session:Report --root:"Report"
xml --action:getvalue --session:Orders --xpath:"/Orders/Order[1]/Total" --output:total
xml --action:setvalue --session:Orders --xpath:"/Orders/Order[1]/Status" --value:"Shipped"
xml --action:getattribute --session:Orders --xpath:"/Orders/Order[1]" --attribute:"id" --output:orderId
xml --action:setattribute --session:Orders --xpath:"/Orders/Order[1]" --attribute:"checked" --value:"true"
xml --action:removeattribute --session:Orders --xpath:"/Orders/Order[1]" --attribute:"checked"
xml --action:getnodes --session:Orders --xpath:"/Orders/Order" --output:orders
xml --action:count --session:Orders --xpath:"/Orders/Order" --output:orderCount
xml --action:addnode --session:Report --xpath:"/Report" --name:"Line" --value:$total$
xml --action:deletenode --session:Orders --xpath:"/Orders/Order[@cancelled='true']"
xml --action:getxml --session:Report --output:reportXml
xml --action:save --session:Orders
xml --action:saveas --session:Report --file:"C:\report.xml"
xml --action:close --session:Orders

json JSON

Reads and builds JSON, e.g. the data a web service returned (restapi --output:$response$ → $response.Json$). Paths look like data.items[0].name.

Actions (--action)

--action:parse

Turns JSON text into an object or list.

ParameterValueDefaultDescription
--text requiredany valueJSON text or a $variable$ holding it
--output requiredvariable nameVariable that receives the result
--action:readfile

Reads a .json file.

ParameterValueDefaultDescription
--file requiredtextA file on the agent machine.
--encodingtextutf-8
--output requiredvariable nameVariable that receives the result
--action:getvalue

Reads the value at a path (an object or list stays one).

ParameterValueDefaultDescription
--source requiredany valueJSON: a variable (e.g. $response.Json$) or JSON text
--path requiredtexte.g. data.items[0].name, items[$i$].price or ["key with spaces"]
--defaultany valueUsed when the path does not exist or is null; without it a missing path is an error
--output requiredvariable nameVariable that receives the result
--action:setvalue

Sets the value at a path in a variable; missing objects on the way are created.

ParameterValueDefaultDescription
--name requiredvariable nameVariable holding the JSON (created when it does not exist)
--path requiredtexte.g. data.items[0].name, items[$i$].price or ["key with spaces"]
--value requiredany value
--valuetypeone of auto, string, number, boolean, jsonautoauto: true/false, numbers and {…}/[…] get their JSON type; a $variable$ keeps its type
--action:remove

Removes the key or list item at a path.

ParameterValueDefaultDescription
--name requiredvariable nameVariable holding the JSON
--path requiredtexte.g. data.items[0].name, items[$i$].price or ["key with spaces"]
--action:count
ParameterValueDefaultDescription
--source requiredany valueJSON: a variable (e.g. $response.Json$) or JSON text
--pathtexte.g. data.items[0].name, items[$i$].price or ["key with spaces"]; the whole JSON when empty
--output requiredvariable nameVariable that receives the result
--action:keys
ParameterValueDefaultDescription
--source requiredany valueJSON: a variable (e.g. $response.Json$) or JSON text
--pathtexte.g. data.items[0].name, items[$i$].price or ["key with spaces"]; the whole JSON when empty
--output requiredvariable nameVariable that receives the result
--action:todatatable

Turns a list of objects into a data table (e.g. for excel writerange or loop).

ParameterValueDefaultDescription
--source requiredany valueJSON: a variable (e.g. $response.Json$) or JSON text
--pathtexte.g. data.items[0].name, items[$i$].price or ["key with spaces"]; the whole JSON when empty
--output requiredvariable nameVariable that receives the result
--action:stringify

Turns an object or list into JSON text (e.g. a request body).

ParameterValueDefaultDescription
--source requiredany valueJSON: a variable (e.g. $response.Json$) or JSON text
--indenttrue / falsefalseMulti-line, indented text
--output requiredvariable nameVariable that receives the result
--action:writefile

Saves JSON to a file.

ParameterValueDefaultDescription
--source requiredany valueJSON: a variable (e.g. $response.Json$) or JSON text
--file requiredtextA file on the agent machine.
--indenttrue / falsetrueMulti-line, indented text
--encodingtextutf-8

csv CSV

Reads CSV files into data tables and writes data tables as CSV. Every cell is read as text.

Actions (--action)

--action:read
ParameterValueDefaultDescription
--file requiredtextA file on the agent machine.
--delimitertextautoauto finds comma, semicolon, tab or |; or give the character (or its name: comma, semicolon, tab, pipe)
--headertrue / falsetrueThe first row holds the column names; otherwise they are Column1, Column2…
--encodingtextutf-8e.g. utf-8 or windows-1254
--output requiredvariable nameVariable that receives the result
--action:write
ParameterValueDefaultDescription
--data required$variable$A data table (or a list of records)
--file requiredtextA file on the agent machine.
--delimitertext,One character (or its name: comma, semicolon, tab, pipe)
--headertrue / falsetrueWrite the column names as the first row
--encodingtextutf-8
--appendtrue / falsefalseAdd the rows to an existing file (its header is not repeated)

Examples

csv --action:read --file:"C:\Data\orders.csv" --output:orders
csv --action:read --file:"C:\Data\export.txt" --delimiter:tab --header:false --encoding:"windows-1254" --output:rows
csv --action:write --data:$orders$ --file:"C:\Out\orders.csv" --delimiter:";"
csv --action:write --data:$newRows$ --file:"C:\Out\orders.csv" --append:true

pdf PDF

Reads the text of PDF files and merges, splits or extracts their pages (no PDF program needed). Scanned pages are images and have no text.

Actions (--action)

--action:gettext

The text of the document, or of some of its pages.

ParameterValueDefaultDescription
--file requiredtextPDF file A file on the agent machine.
--pagestextPage numbers and ranges, e.g. 1-3,5 or 4- (page 4 to the last); all pages when empty
--passwordtextPassword that opens the document, when it is protected
--output requiredvariable nameVariable that receives the result
--action:getpagecount

The number of pages.

ParameterValueDefaultDescription
--file requiredtextPDF file A file on the agent machine.
--passwordtextPassword that opens the document, when it is protected
--output requiredvariable nameVariable that receives the result
--action:getinfo

A record with PageCount, Title, Author, Subject, Keywords, Creator, Producer, CreatedDate, ModifiedDate and IsEncrypted.

ParameterValueDefaultDescription
--file requiredtextPDF file A file on the agent machine.
--passwordtextPassword that opens the document, when it is protected
--output requiredvariable nameVariable that receives the result
--action:merge

Joins PDF files into one, in the given order.

ParameterValueDefaultDescription
--files requiredany valueA list variable (e.g. from folder listfiles) or comma-separated paths
--destination requiredtextPDF file to write (replaced when it exists) A file on the agent machine.
--action:extractpages

Writes some pages of a document to a new PDF, in the order given.

ParameterValueDefaultDescription
--file requiredtextPDF file A file on the agent machine.
--pages requiredtextPage numbers and ranges, e.g. 1-3,5 or 4- (page 4 to the last)
--destination requiredtextPDF file to write (replaced when it exists) A file on the agent machine.
--passwordtextPassword that opens the document, when it is protected
--action:split

Writes every page to its own PDF (<name>_1.pdf, <name>_2.pdf, …); --output receives the list of files.

ParameterValueDefaultDescription
--file requiredtextPDF file A file on the agent machine.
--folder requiredtextFolder for the page files (created when missing) A folder on the agent machine.
--passwordtextPassword that opens the document, when it is protected
--outputvariable nameVariable that receives the result

Examples

pdf --action:gettext --file:"C:\Invoices\2026-001.pdf" --output:text
pdf --action:gettext --file:$file.Path$ --pages:"1-3,5" --password:$pdfPassword$ --output:text
pdf --action:getpagecount --file:"C:\Invoices\2026-001.pdf" --output:pageCount
pdf --action:getinfo --file:"C:\Invoices\2026-001.pdf" --output:info
pdf --action:merge --files:$files$ --destination:"C:\Out\all.pdf"
pdf --action:merge --files:"C:\a.pdf, C:\b.pdf" --destination:"C:\Out\ab.pdf"
pdf --action:extractpages --file:"C:\report.pdf" --pages:"2-" --destination:"C:\Out\without-cover.pdf"
pdf --action:split --file:"C:\report.pdf" --folder:"C:\Out\pages" --output:pageFiles

database Database

Runs database queries; results are stored as datatable variables.

Parameters of every variant

ParameterValueDefaultDescription
--timeoutnumber30Timeout in seconds
--retrynumberNumber of retry attempts. When not set, screen and file commands try once more after a passing problem (a page still loading, a covered element, a locked file); 0 turns that off
--retryintervalnumber1Seconds between retries

Actions (--action)

--action:connect
ParameterValueDefaultDescription
--provider requiredone of sqlserver, mysql, postgresql, oracle, sqlite
--connectionstring requiredtext
--session requiredtextName for this connection, used by the following database commands
--action:disconnect
ParameterValueDefaultDescription
--session requiredtextSession name given when connecting Names a database session opened earlier.
--action:query
ParameterValueDefaultDescription
--session requiredtextSession name given when connecting Names a database session opened earlier.
--query requiredtext
--paramstextComma-separated name=value pairs, e.g. id=$id$,status=active
--outputvariable nameVariable that receives the result
--action:execute
ParameterValueDefaultDescription
--session requiredtextSession name given when connecting Names a database session opened earlier.
--query requiredtext
--paramstextComma-separated name=value pairs, e.g. id=$id$,status=active
--outputvariable nameVariable that receives the result
--action:callprocedure
ParameterValueDefaultDescription
--session requiredtextSession name given when connecting Names a database session opened earlier.
--procedure requiredtext
--paramstextComma-separated name=value pairs, e.g. id=$id$,status=active
--outputvariable nameVariable that receives the result

Examples

database --action:connect --provider:sqlserver --connectionstring:"Server=...;Database=...;" --session:Crm
database --action:query --session:Crm --query:"SELECT * FROM Users WHERE Status=@status" --params:"status=active" --output:resultTable
database --action:execute --session:Crm --query:"UPDATE Users SET Status=@status WHERE Id=@id" --params:"status=inactive,id=5" --output:affectedRows
database --action:callprocedure --session:Crm --procedure:"sp_ProcessOrder" --params:"orderId=123" --output:procResult
database --action:disconnect --session:Crm
Botream 0.1.1 · Generated 2026-10-14