Difference between revisions of "Excelreader-call"

From GreenVulcano Wiki
Jump to: navigation, search
Line 1: Line 1:
 
==Definition==
 
==Definition==
Many IT applications in their business process needs to read an Excel file. GreenVulcano Gvvcl-excelreader plug-in helps IT organizations integrating applications that use Excel format to execute their business.
+
Many IT applications, within their business process, need to read an Excel file. ''Gvvcl-excelreader'' plug-in helps IT organizations integrating applications that use Excel format to execute their business.
Gvvcl-excelreader plug-in is compatible with all Excel formats up to version 2003, and it is very simple to configure. It receives in input a stream of Excel file and returns in output an XML structure. At the output of Gvvcl-excelreader plug-in is possible to apply a [[changeGvBuffer]] operation (with [[ognl script]] or an [[xsl stylesheet]]) to retrieve all interested data.
+
''Gvvcl-excelreader'' plug-in is compatible with all Excel formats up to version 2003, and it is very simple to configure. It receives in input a binary stream containing the Excel file, and returns in output a corresponding XML structure. At the output of ''Gvvcl-excelreader' plug-in is possible to apply a [[changeGvBuffer]] operation (with [[ognl script]] or an [[xsl stylesheet]]) to retrieve all interested data.
  
GreenVulcano ESB provides two tools, [[GVConsole]] and [[Vulcon]], to configure all GreenVulcano supported plug-ins in GV services.
+
<span class="gvprodname">GreenVulcano&reg; ESB</span> provides two different tools, [[GVConsole]] and [[Vulcon]], to configure all supported plug-ins in GV services.
  
 
==Vulcon Configuration==
 
==Vulcon Configuration==
''excelreader-call'' is the operation that must be configured into Vulcon ''system'' section, to convert a Excel file, in GVBuffer.object field, in an XML document.  
+
''excelreader-call'' is the operation that must be configured into [[Vulcon]] ''system'' section, to convert an Excel file in GVBuffer.object field, in an XML document.  
 
[[Image:CreateOperationExcelReader.png|right|thumb|Vulcon system excel-reader configuration ]]
 
[[Image:CreateOperationExcelReader.png|right|thumb|Vulcon system excel-reader configuration ]]
 
In order to add an operation ''excelreader-call'' you must perform the following operation:
 
In order to add an operation ''excelreader-call'' you must perform the following operation:
Line 16: Line 16:
 
At this point, you have configured an operation of type ''excelreader-call''.
 
At this point, you have configured an operation of type ''excelreader-call''.
  
To use an ''excelreader-call'' in a GreenVulcano ESB service, you need to perfom the following steps:
+
To use an ''excelreader-call'' in a <span class="gvprodname">GreenVulcano&reg; ESB</span> service, you need to perfom the following steps:
 
[[File:Service-GVvcl-excel.png|right|thumb|Vulcon service excel-reader configuration ]]
 
[[File:Service-GVvcl-excel.png|right|thumb|Vulcon service excel-reader configuration ]]
 
* In [[Vulcon services section]] select the services that you want modify or you can create a new Services
 
* In [[Vulcon services section]] select the services that you want modify or you can create a new Services
* On flow tag, you clicks the right mouse button and select "insert before"  
+
* On flow tag, click the right mouse button and select "insert before"  
 
* On the list of GreenVulcano node select ''GvOperationNode''
 
* On the list of GreenVulcano node select ''GvOperationNode''
* On the template that appear, you must  select from drop down list, input fiel, next-node-id and as operation-name the operation configured in the system. Fill in fields id and output.
+
* On the template that appears, select from drop down list, input field, next-node-id and as operation-name the operation configured in the system. Fill in fields id and output.
 
* Use Vulcon function [[Export in compressed file]]
 
* Use Vulcon function [[Export in compressed file]]
 
* Reload configuration from [[GvConsole Reload configuration]]
 
* Reload configuration from [[GvConsole Reload configuration]]
  
At this point you have use ''excelreader-call'' operation in a GreenVulcano service.
+
At this point you have inserted an ''excelreader-call'' operation within a <span class="gvprodname">GreenVulcano&reg; ESB</span> service.
  
 
==GVconsole Configuration==
 
==GVconsole Configuration==
''excelreader-call'' is the operation that must be configured into GvConsole ''system'' section, to convert a Excel file, in GVBuffer.object field, in a XML document.  
+
''excelreader-call'' is the operation that must be configured into [[GvConsole]] ''system'' section, to convert an Excel file in GVBuffer.object field, in a XML document.  
 
[[Image:CreateOperationExcelReaderGVConsole.png|right|thumb|GvConsole system excel-reader configuration ]]
 
[[Image:CreateOperationExcelReaderGVConsole.png|right|thumb|GvConsole system excel-reader configuration ]]
To  add an operation ''excelreader-call'' user must perform the following operation:
+
To  add an operation ''excelreader-call'' you must perform the following operation:
* You open [[GVconsole system section]]
+
* Open [[GVconsole system section]]
* You clicks button "insert before" and select label --> excelreader-call
+
* Click button "insert before" and select label --> excelreader-call
* In layout you fill in field ''name'', i.e. the name of operation that will be used in [[Vulcon service section]]
+
* In layout fill in field ''name'', i.e. the name of operation that will be used in [[Vulcon service section]]
 
* Other fields ''class'', ''onlyData'' and ''type'' will be ignored
 
* Other fields ''class'', ''onlyData'' and ''type'' will be ignored
At this point, you have configured an operation of type ''excelreader-call'' in a GvConsole.
 
  
To use an ''excelreader-call'' in a GreenVulcano ESB service, you need to perfom the following steps:
+
At this point, you have configured an operation of type ''excelreader-call'' in [[GvConsole]].
 +
 
 +
To use an ''excelreader-call'' in a <span class="gvprodname">GreenVulcano&reg; ESB</span> service, you need to perfom the following steps:
 
[[File:Service-GVvcl-excelGvConsole.png|right|thumb|GvConsole service excel-reader configuration ]]
 
[[File:Service-GVvcl-excelGvConsole.png|right|thumb|GvConsole service excel-reader configuration ]]
* In [[GvConsole services section]] select the services that you want modify or you can create a new Services
+
* In [[GvConsole services section]] select the services that you want to modify or, alternatively, you can create a new Services
* On flow tag, you clicks the add operation node button and select "insert before"  
+
* On flow tag, click the add operation node button and select "insert before"  
 
* On the list of GreenVulcano node select ''GvOperationNode''
 
* On the list of GreenVulcano node select ''GvOperationNode''
* On the template that appear, you must select from drop down list, ''input'' field, ''next-node-id'' and as ''operation-name'' the operation configured in the system. Fill in fields id and output.
+
* On the template that appear, select from drop down list, ''input'' field, ''next-node-id'' and as ''operation-name'' the operation configured in the system. Fill in fields id and output.
 
* Click ''save button and terminate editing''  
 
* Click ''save button and terminate editing''  
* [[Reload Configuration from GvConsole]]
+
* Reload configuration from [[GvConsole Reload configuration]]
  
 
At this point you have configured a service with an ''excelreader'' operation.
 
At this point you have configured a service with an ''excelreader'' operation.

Revision as of 15:16, 27 September 2011

Definition

Many IT applications, within their business process, need to read an Excel file. Gvvcl-excelreader plug-in helps IT organizations integrating applications that use Excel format to execute their business. Gvvcl-excelreader plug-in is compatible with all Excel formats up to version 2003, and it is very simple to configure. It receives in input a binary stream containing the Excel file, and returns in output a corresponding XML structure. At the output of Gvvcl-excelreader' plug-in is possible to apply a changeGvBuffer operation (with ognl script or an xsl stylesheet) to retrieve all interested data.

GreenVulcano® ESB provides two different tools, GVConsole and Vulcon, to configure all supported plug-ins in GV services.

Vulcon Configuration

excelreader-call is the operation that must be configured into Vulcon system section, to convert an Excel file in GVBuffer.object field, in an XML document.

File:CreateOperationExcelReader.png
Vulcon system excel-reader configuration

In order to add an operation excelreader-call you must perform the following operation:

  • open Vulcon system section
  • Then click right mouse button and select "insert before" label --> excelreader-call
  • In layout fill in field name, i.e. the name of operation that will be used in Vulcon service section
  • Other fields class, onlyData and type will be ignored

At this point, you have configured an operation of type excelreader-call.

To use an excelreader-call in a GreenVulcano® ESB service, you need to perfom the following steps:

File:Service-GVvcl-excel.png
Vulcon service excel-reader configuration
  • In Vulcon services section select the services that you want modify or you can create a new Services
  • On flow tag, click the right mouse button and select "insert before"
  • On the list of GreenVulcano node select GvOperationNode
  • On the template that appears, select from drop down list, input field, next-node-id and as operation-name the operation configured in the system. Fill in fields id and output.
  • Use Vulcon function Export in compressed file
  • Reload configuration from GvConsole Reload configuration

At this point you have inserted an excelreader-call operation within a GreenVulcano® ESB service.

GVconsole Configuration

excelreader-call is the operation that must be configured into GvConsole system section, to convert an Excel file in GVBuffer.object field, in a XML document.

File:CreateOperationExcelReaderGVConsole.png
GvConsole system excel-reader configuration

To add an operation excelreader-call you must perform the following operation:

  • Open GVconsole system section
  • Click button "insert before" and select label --> excelreader-call
  • In layout fill in field name, i.e. the name of operation that will be used in Vulcon service section
  • Other fields class, onlyData and type will be ignored

At this point, you have configured an operation of type excelreader-call in GvConsole.

To use an excelreader-call in a GreenVulcano® ESB service, you need to perfom the following steps:

File:Service-GVvcl-excelGvConsole.png
GvConsole service excel-reader configuration
  • In GvConsole services section select the services that you want to modify or, alternatively, you can create a new Services
  • On flow tag, click the add operation node button and select "insert before"
  • On the list of GreenVulcano node select GvOperationNode
  • On the template that appear, select from drop down list, input field, next-node-id and as operation-name the operation configured in the system. Fill in fields id and output.
  • Click save button and terminate editing
  • Reload configuration from GvConsole Reload configuration

At this point you have configured a service with an excelreader operation.

Example

This example shows an XML document generated by a simple Excel sheet (without cols and rows grouping). Given an Excel sheet with the following structure:

ID1 ID2 ID3 ID4 ID5 ID6 ID7
23 23232 23 23333 1 2 3
24 24444 23 23332 1 2 3

excelreader-call generates the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<workbook>
    <sheet number="0">
        <name><![CDATA[Foglio1]]></name>
        <row number="0">
            <col number="0">
                <data><![CDATA[ID1]]></data>
            </col>
            <col number="1">
                <data><![CDATA[ID2]]></data>
            </col>
            <col number="2">
                <data><![CDATA[ID3]]></data>
            </col>
            <col number="3">
                <data><![CDATA[ID4]]></data>
            </col>
            <col number="4">
                <data><![CDATA[ID5]]></data>
            </col>
            <col number="5">
                <data><![CDATA[ID6]]></data>
            </col>
            <col number="6">
                <data><![CDATA[ID7]]></data>
            </col>
        </row>
        <row number="1">
            <col number="0">
                <data><![CDATA[23]]></data>
            </col>
            <col number="1">
                <data><![CDATA[23232]]></data>
            </col>
            <col number="2">
                <data><![CDATA[23]]></data>
            </col>
            <col number="3">
                <data><![CDATA[711]]></data>
            </col>
            <col number="4">
                <data><![CDATA[1]]></data>
            </col>
            <col number="5">
                <data><![CDATA[1]]></data>
            </col>
            <col number="6">
                <data><![CDATA[1]]></data>
            </col>
        </row>
        <row number="2">
            <col number="0">
                <data><![CDATA[23]]></data>
            </col>
            <col number="1">
                <data><![CDATA[711]]></data>
            </col>
            <col number="2">
                <data><![CDATA[23]]></data>
            </col>
            <col number="3">
                <data><![CDATA[23232]]></data>
            </col>
            <col number="4">
                <data><![CDATA[1]]></data>
            </col>
            <col number="5">
                <data><![CDATA[1]]></data>
            </col>
            <col number="6">
                <data><![CDATA[1]]></data>
            </col>
        </row>
    </sheet>
</workbook>

With a ChangeGVBuffer node is possible parsing XML and retrieve any tag and value.


--A.sicignano 15:29, 26 September 2011 (CEST)