test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/schema/xls/XlsUtilsTest.java
test_class.identifier: XlsUtilsTest
test_case.body: @Test
      public void get_active_sheets_simple() throws Exception {
  
          List<String> names =
                  XlsUtils.getActiveSheetsFromWorkbookSpec(getClass().getResourceAsStream("simple_workbook.xml"));
  
          Assertions
                  .assertThat(names)
                  .isNotEmpty() //
                  .containsExactly("Feuille1", "Feuille2", "Feuille3");
  
      }
test_case.class_method_signature: XlsUtilsTest.get_active_sheets_simple()
test_case.full_signature: @Test public void get_active_sheets_simple()
test_case.identifier: get_active_sheets_simple
test_case.invocations: getActiveSheetsFromWorkbookSpec getResourceAsStream getClass containsExactly isNotEmpty assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void get_active_sheets_simple()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(XlsUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(XlsUtils.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: XML_INPUT_FACTORY = XMLInputSingletonHolder.xmlInputFactory
focal_class.modifier: private static final
focal_class.original_string: private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputSingletonHolder.xmlInputFactory;
focal_class.type: XMLInputFactory
focal_class.var_name: XML_INPUT_FACTORY
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/schema/xls/XlsUtils.java
focal_class.identifier: XlsUtils
focal_class.class_method_signature: XlsUtils.XlsUtils()
focal_class.full_signature: private  XlsUtils()
focal_class.identifier: XlsUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  XlsUtils()
focal_class.class_method_signature: XlsUtils.getCellValueAsString(Cell cell, FormulaEvaluator formulaEvaluator)
focal_class.full_signature: public static String getCellValueAsString(Cell cell, FormulaEvaluator formulaEvaluator)
focal_class.identifier: getCellValueAsString
focal_class.modifiers: public static
focal_class.parameters: (Cell cell, FormulaEvaluator formulaEvaluator)
focal_class.return: String
focal_class.signature: String getCellValueAsString(Cell cell, FormulaEvaluator formulaEvaluator)
focal_class.class_method_signature: XlsUtils.getCellValueAsString(Cell cell, CellValue cellValue)
focal_class.full_signature: private static String getCellValueAsString(Cell cell, CellValue cellValue)
focal_class.identifier: getCellValueAsString
focal_class.modifiers: private static
focal_class.parameters: (Cell cell, CellValue cellValue)
focal_class.return: String
focal_class.signature: String getCellValueAsString(Cell cell, CellValue cellValue)
focal_class.class_method_signature: XlsUtils.getNumericValue(Cell cell, CellValue cellValue, boolean fromFormula)
focal_class.full_signature: private static String getNumericValue(Cell cell, CellValue cellValue, boolean fromFormula)
focal_class.identifier: getNumericValue
focal_class.modifiers: private static
focal_class.parameters: (Cell cell, CellValue cellValue, boolean fromFormula)
focal_class.return: String
focal_class.signature: String getNumericValue(Cell cell, CellValue cellValue, boolean fromFormula)
focal_class.class_method_signature: XlsUtils.isNewExcelFormat(InputStream inputStream)
focal_class.full_signature: public static boolean isNewExcelFormat(InputStream inputStream)
focal_class.identifier: isNewExcelFormat
focal_class.modifiers: public static
focal_class.parameters: (InputStream inputStream)
focal_class.return: boolean
focal_class.signature: boolean isNewExcelFormat(InputStream inputStream)
focal_class.class_method_signature: XlsUtils.getActiveSheetsFromWorkbookSpec(InputStream inputStream)
focal_class.full_signature: public static List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream)
focal_class.identifier: getActiveSheetsFromWorkbookSpec
focal_class.modifiers: public static
focal_class.parameters: (InputStream inputStream)
focal_class.return: List<String>
focal_class.signature: List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream)
focal_class.class_method_signature: XlsUtils.getColumnsNumber(InputStream inputStream)
focal_class.full_signature: public static int getColumnsNumber(InputStream inputStream)
focal_class.identifier: getColumnsNumber
focal_class.modifiers: public static
focal_class.parameters: (InputStream inputStream)
focal_class.return: int
focal_class.signature: int getColumnsNumber(InputStream inputStream)
focal_class.class_method_signature: XlsUtils.getAttributesNameValue(XMLStreamReader streamReader)
focal_class.full_signature: private static Map<String, String> getAttributesNameValue(XMLStreamReader streamReader)
focal_class.identifier: getAttributesNameValue
focal_class.modifiers: private static
focal_class.parameters: (XMLStreamReader streamReader)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getAttributesNameValue(XMLStreamReader streamReader)
focal_class.class_method_signature: XlsUtils.getColumnsNumberFromDimension(String dimension)
focal_class.full_signature: public static int getColumnsNumberFromDimension(String dimension)
focal_class.identifier: getColumnsNumberFromDimension
focal_class.modifiers: public static
focal_class.parameters: (String dimension)
focal_class.return: int
focal_class.signature: int getColumnsNumberFromDimension(String dimension)
focal_class.class_method_signature: XlsUtils.getColumnNumberFromCellRef(String lastCell)
focal_class.full_signature: public static int getColumnNumberFromCellRef(String lastCell)
focal_class.identifier: getColumnNumberFromCellRef
focal_class.modifiers: public static
focal_class.parameters: (String lastCell)
focal_class.return: int
focal_class.signature: int getColumnNumberFromCellRef(String lastCell)
focal_method.body: public static List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream) throws XMLStreamException {
          // If doesn't support mark, wrap up
          if (!inputStream.markSupported()) {
              inputStream = new PushbackInputStream(inputStream, 8);
          }
          XMLStreamReader streamReader = XML_INPUT_FACTORY.createXMLStreamReader(inputStream);
          try {
              /*
               *
               * <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <workbook
               * xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
               * xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"> <fileVersion appName="xl"
               * lastEdited="5" lowestEdited="5" rupBuild="9303" codeName="{8C4F1C90-05EB-6A55-5F09-09C24B55AC0B}"/>
               * <workbookPr codeName="ThisWorkbook" defaultThemeVersion="124226"/> <bookViews> <workbookView xWindow="0"
               * yWindow="732" windowWidth="22980" windowHeight="8868" firstSheet="1" activeTab="8"/> </bookViews>
               * <sheets> <sheet name="formdata" sheetId="4" state="hidden" r:id="rId1"/> <sheet name="MONDAY" sheetId="1"
               * r:id="rId2"/> <sheet name="TUESDAY" sheetId="8" r:id="rId3"/> <sheet name="WEDNESDAY" sheetId="10"
               * r:id="rId4"/> <sheet name="THURSDAY" sheetId="11" r:id="rId5"/> <sheet name="FRIDAY" sheetId="12"
               * r:id="rId6"/> <sheet name="SATURDAY" sheetId="13" r:id="rId7"/> <sheet name="SUNDAY" sheetId="14"
               * r:id="rId8"/> <sheet name="WEEK SUMMARY" sheetId="15" r:id="rId9"/> </sheets>
               *
               */
              // we only want sheets not with state=hidden
  
              List<String> names = new ArrayList<>();
  
              while (streamReader.hasNext()) {
                  switch (streamReader.next()) {
                  case START_ELEMENT:
                      if (StringUtils.equals(streamReader.getLocalName(), "sheet")) {
                          Map<String, String> attributesValues = getAttributesNameValue(streamReader);
                          if (!attributesValues.isEmpty()) {
                              String sheetState = attributesValues.get("state");
                              if (!StringUtils.equals(sheetState, "hidden")) {
                                  String sheetName = attributesValues.get("name");
                                  names.add(sheetName);
                              }
                          }
                      }
                      break;
                  case XMLStreamConstants.END_ELEMENT:
                      if (StringUtils.equals(streamReader.getLocalName(), "sheets")) {
                          // shortcut to stop parsing
                          return names;
                      }
                      break;
                  default:
                      // no op
                  }
              }
              return names;
          } finally {
              if (streamReader != null) {
                  streamReader.close();
              }
          }
      }
focal_method.class_method_signature: XlsUtils.getActiveSheetsFromWorkbookSpec(InputStream inputStream)
focal_method.full_signature: public static List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream)
focal_method.identifier: getActiveSheetsFromWorkbookSpec
focal_method.invocations: markSupported createXMLStreamReader hasNext next equals getLocalName getAttributesNameValue isEmpty get equals get add equals getLocalName close
focal_method.modifiers: public static
focal_method.parameters: (InputStream inputStream)
focal_method.return: List<String>
focal_method.signature: List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream)