Excelreader-call

From GreenVulcano Wiki
Revision as of 13:27, 26 September 2011 by Anonymous (talk)
Jump to: navigation, search

Definition

Many IT applications in their business process needs read an excel file. GreenVulcano Gvvcl-excel-reader Plug-in helps IT organizations integrate applications that utilize excel format to execute their business. Gvvcl-excel-reader Plug-in is compatible with all Excel format up to 2003, and is very simple to configure. It receive in input a stream of excel file and give in output an XML structure. At the output of Gvvcl-excel-reader Plug-in is possible apply a changeGvBuffer operation (with ognl script or a xsl stylesheet) to retrieve all interest data.

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

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 a XML document.

File:CreateOperationExcelReader.png
Vulcon system excel-reader configuration

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

  • You open Vulcon system section and his channel
  • You clicks the right mouse button and select "insert before" label --> excelreader-call
  • In layout you 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, you clicks the right mouse button and select "insert before"
  • 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.

At this point you have use excelreader-call operation in a GreenVulcano service.



GVconsole Configuration

bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla bla

Example

This example shows a XML document generated by a simple excel (without cols and rows grouping). Give an xml with the following structure:


ID1ID2ID3ID4ID5ID6ID7
23232322323333123
24244442323332123

excelreader-call generate 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[SOURCE_RNCID]]></data>
            </col>
            <col number="1">
                <data><![CDATA[SOURCE_CELLID]]></data>
            </col>
            <col number="2">
                <data><![CDATA[TARGET_RNCID]]></data>
            </col>
            <col number="3">
                <data><![CDATA[TARGET_CELLID]]></data>
            </col>
            <col number="4">
                <data><![CDATA[selectionPriority]]></data>
            </col>
            <col number="5">
                <data><![CDATA[qOffset1sn]]></data>
            </col>
            <col number="6">
                <data><![CDATA[qOffset2sn]]></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 node ChangeGVBuffer is possible parsing XML and retrieve any tag and value of XML. --A.sicignano 15:27, 26 September 2011 (CEST)