wso2 esb 中是否有任何本机功能可用于从多个 excel 文件表中获取数据?

Is there any native functionality available in wso2 esb for fetching the data from multiple excel file sheets?

我想使用 wso2 esb 或 wso2 dss 功能从多张 excel 文件中提取数据。只是我想用 wso2 的本机组件来完成这些任务,而不是用自定义 class 调解器。

是否可以请某人指导我一些示例或步骤?

使用 DSS,您可以添加一个 excel 文件作为数据源,然后指定一个查询,告诉它要检索的工作表和列,如下所示。有一个 json 和 xml 示例 'query' 都公开为资源。您可以为更多 excel 工作表添加配置或创建单独的数据服务。

<data name="excel-ds" transports="http https">
    <config id="SAMPLE">
        <property name="excel_datasource">/file/path/sample.xlsx</property>
    </config>
    <query id="GET_JSON" useConfig="SAMPLE">
        <excel>
            <workbookname>sampledata</workbookname>
            <hasheader>true</hasheader>
            <startingrow>2</startingrow>
            <maxrowcount>-1</maxrowcount>
        </excel>
        <result outputType="json">{
      "Rows": {
         "Row": [
          {
          "EMPnr": "$EMPnr",
          "Name": "$name",
          "Email": "$email"
          }
        ]
      }
      }</result>
    </query>

    <query id="GET_XML" useConfig="SAMPLE">
        <excel>
            <workbookname>samplesheet</workbookname>
            <hasheader>true</hasheader>
            <startingrow>2</startingrow>
            <maxrowcount>-1</maxrowcount>
        </excel>
        <result element="Rows" rowName="Row">
            <element column="empnr" name="Empnr" xsdType="string"/>
            <element column="name" name="Name" xsdType="string"/>
            <element column="email" name="Email" xsdType="string"/>
        </result>
    </query>

    <resource method="GET" path="samplejson">
        <call-query href="GET_JSON"/>
    </resource>
    <resource method="GET" path="samplexml">
        <call-query href="GET_XML"/>
    </resource>
</data>

用于文件检查wso2.com