• Font Size
  • S
  • M
  • L
  • Top Category > General Questions > DataSpider Servista > [DataSpider Servista] There are multiple sheets in the Excel file and the sheet name is variable. I would like to read the data after getting the name of each sheet. Is there any good way to do this

Search via FAQ No.


  • No : 30534
  • Open Date : 2019/09/04 11:01
  • Print
NEW

[DataSpider Servista] There are multiple sheets in the Excel file and the sheet name is variable. I would like to read the data after getting the name of each sheet. Is there any good way to do this

There are multiple sheets in the Excel file and the sheet name is variable. I want to read the data after getting the name of each sheet. Please let me know if there is a good way to do this.
Category : 

Answer

Acquire the sheet name using the [Get Sheet Names] process, place the [Loop by Number of Data] process, set the sheet name to a variable in Mapper, and set the sheet name to a variable. After setting these all, use the Excel sheet reading process to read the sheet.

■Procedure
 1.Retrieve the sheet name using the Get Sheet Names process
 2.Place the [Loop by Number of Data] process and set [Separation Path] in the [XML data processing] tab in the property as "/book/sheet".*
 3.Place the Mapper and draw a line from the "/book/sheet" of the input schema to a variable.
 4.Use the Read from sheet to read the sheet.

 * The [Get Sheet Names] process is the following XML type schema.
  ------------
  <book>
   <sheet>{sheet name 1}</sheet>
   <sheet>{sheet name 2}</sheet>
   ...
  </book>
  ------------
 For this reason, please set [Separation Path] in the [XML Data Processing] tab as "/book/sheet" in the [Loop by Number of Data] process property.

 Please refer to the DataSpiderServista help below for details about each process and logic:
  ・[Adapter]-[File]-[Excel]-[Get Sheet Names]-[Schema]
  URL:https://www.hulft.com/help/en-us/DataSpider/dss42sp2/help/en/adapter/file/excel_get_sheet_name.html
  ・[Adapter]-[Basic]-[Flow]-[Loop by Number of Data]-[Properties]
  URL:https://www.hulft.com/help/en-us/DataSpider/dss42sp2/help/en/adapter/basic/foreach.html

 
Version Information
Ver.4.1、Ver.4.0、Ver.3.2