Microsoft

Category: Articles
Published on Monday, 14 January 2019 19:08
Written by AltonaLab
Hits: 560

Block DataSetExportToExcel

License: Industrial

Because the DataSet represents a database in the memory, it can easily be exported to an Excel document. For this purpose, the DataSetExportToExel block is used. When the input DoExport becomes to high level, the data located at the input InDataSet will be saved to excel document with name specified in the FullFileName parameter. At the DataSet parameter you need to set which columns from the incoming InDataSet will be exported and in what sequence.

Block's parameters:

Block's inputs:

Block's outputs:

Important!!! Before use of this block, library.dll has to be installed! In other case, the application will crash, when the block tries to export the DataSet to excel document. For this purpose, please do the next:

 

Block ExcelReader

License: Industrial

The block gives us an easy way to load the contents of an Excel document in DataSet. In the DataSet parameter, we need to describe the columns of the document, data type and their sequence. When the parameter DataSet is opened, column of the grid: ExcelColumn is very important, it specifies the DataSet column, from which excel column of the document will be read. The output of the block OutDataSet will be with the same columns as the parameter DataSet.

Block's parameters:

Block's inputs:

Block's outputs:

 

Block ExportToWord

License: Industrial

The block is extremely powerful and allows easy creation of complex reports, including block output values, DataSets content, images from the executed diagram. For this purpose we first create a WORD document, which we will call the Template.

In the Template, we can deploy three types of objects whose values we take from a working diagram:

Block's parameters:

Block's Inputs:

Block's Outputs:

Example:
For example, please load the diagram from DEMOs - MicrosoftExports.nsm. The WORD template file is: c:\AltonaLab\Demos\TestPatt.docx

The demo diagram is:

The demo WORD template:

Before run the diagram, please install library.dll, it is needed for export to Excell block. The diagram has two sine wave generators and theirs signals are substracted. All the result signals are stored at DataSetStorageBlock and is shown at Image control.

When the button Export to excel is pressed, the export will look like:


When the button Export to word is pressed, the export will look like: