This preconfiguration can be activated when creating a new object (e.g. by
"New object ..." in the context menu of the object or by pressing the
Insert key after selecting the object).
This preconfiguration is included in the
"/ Reports / Report to an Excel file" group.
The preconfiguration creates a configured
PmaWebDir object in the
PmaWeb object and inserts the widget files "xlsx.full.min.js" and "Template.xlsx" into the Resource folder.
PmaWebDir object description
The newly created object in the
PmaWebDir.onPageModify event catches the request to open the HTML page
widget.htm sent by the
CreateFile method with the
sFile and
sDataType parameters. It passes this to the
"widget" method, which creates the page and uses the
"xlsx.full.min.js" widget (
https://sheetjs.com) to load the Excel file
"Template.xlsx". It then transfers the data that is prepared in the
JSON format in the
"data" method into the
data sheet of the Excel to the position
"A1". Finally, it saves this file into the "
download" folder set in the Web browser of the client.
Warning:
For the widget to work properly in the local application, it is necessary to have WebView2 (Edge) installed in Windows OS.
The component is called Microsoft Edge WebView2 Runtime version Evergreen.
Its use must be enabled in the application's INI file.
See
Web browser (/#glob/webbrowser)
The widget does not support loading a file containing charts.
These configurators can be set before the preconfiguration is created:
The preconfiguration creates a configured PmaWebDir object in the PmaWeb object and inserts the widget files "xlsx.full.min.js" and "Template.xlsx" into the Resource folder. The widget does not support loading a file containing charts.
The preconfiguration requires support for Microsoft Edge WebView2 Runtime.
And in the application's INI file it is necessary to enter the WebView2=1 key into the [Promotic] section. | |
The name of created object | Name of the object created in the Pma object tree.
The maximum name length is 30 characters.
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and first character must not be a number.
Default: SheetJs |
Path to the PmaWeb object | |
---|
Example of calling a method that generates a report to Excel:
JavaScriptSelect and copy to clipboard
pMe.Pm("/Web/CreateExcelFile").Methods.CreateFile("Boiler1.xlsx", "Boiler1");