- Білдер
- Data Types in Codejig Builder
- Composite Data Types
- Views
- Spreadsheet View
Spreadsheet View
Spreadsheet view can be used to generate diverse sort of Spreadsheet documents containing tables, diagrams, graphs or any other components.
To create it, you have to provide a Spreadsheet template.
Document generation is based on context data which is mapped to the structures defined in the template. The template syntax is described in the following article.
When you have the template ready, the next step is to launch generation and get the resulting document. There are 2 ways for this.
The first one is simpler and needs just adding a button with 'DOWNLOAD_SPREADSHEET' server event. However with this approach the generation is straight-forward and you do not have any configuration options. The button will start generation with the default Spreadsheet view and the output filename will be based on the template filename. If you need to control these options on your own then you may consider second approach.
The other way is to create a custom action block running on client side and calling this.wizardView.downloadSpreadsheet(options) function. The options argument is an object with fields viewId and filename. Both of the fields are optional. Here is a code example:
this.wizardView.downloadSpreadsheet({ viewId: '2500000024117645726', filename: "salaryReport2.xls"})