Promotic

Preconfiguration "Creating an Excel file (*.xlsx) with data (without MS Excel)"



This preconfiguration can be activated when creating a new Pmg object and is included in the group: "/ Widgets / Widgets - Excel". Creates the PmgButton object configured as - Creating an Excel file (*.xlsx) with data (without MS Excel).

Preconfiguration:
- Creates a PmgButton object
- Creates the PmaWebDir subobject in the given PmaPanel object
- Inserts the widget file "xlsx.full.min.js" into the Resource folder.

A script in the onButtonUp event using the Pm.CreateView method opens a html page widget.htm in the PmaWebDir object. This request in the PmaWebDir.onPageModify event creates a html page with a link to the xlsx.full.min.js widget library. It asks for data, which are provided by the "data" method. It writes the data to the "data" sheet of the newly created or loaded excel file. This file is then automatically downloaded to the web client's download folder. And also to the application Data folder of the local user.
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)
These configurators can be set before the preconfiguration is created:
The name of created objectName (identifier) of the Pmg object. It is used for obtaining the Pmg object by the PmgObject.Items method.
This configurator sets the initial value of the Name property.
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 the first character must not be a number.
Preconfiguration:
- Creates a PmgButton object
- Creates the PmaWebDir subobject in the given PmaPanel object
- Inserts the widget file "xlsx.full.min.js" into the Resource folder..
The preconfiguration requires support for Microsoft Edge WebView2 Runtime.
And in the INI file of the application it is necessary to enter the WebView2=1 key into the [Promotic] section.
Name of the PmaWebDir subobjectName of the PmaWebDir subobject
Widget fileWidget file insertion type
Insert file
Use the existing file
Overwrite the existing file
Insert the file with different name
Name of the widget objectName of the widget object

History:
Pm9.00.23: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.