public final int loadWorkbook(final Workbook wb, final Map<String, Object> dataContext) {
    """
	Load workbook.
	
	@param wb
	the wb
	@param dataContext
	the data context
	@return the int
    """

		try {
			clearWorkbook();
			// only support xssf workbook now since 2016 July
			if (!(wb instanceof XSSFWorkbook)) {
				LOG.fine("Error: WebSheet only support xlsx template.");
				return -1;
			}
			LOG.fine("Begin load work book...");
			parent.setWb(wb);
			parent.getSerialDataContext().setDataContext(dataContext);
			parent.setSheetConfigMap(new ConfigurationHandler(parent).buildConfiguration());
			parent.reCalcMaxColCounts();
			parent.getChartHelper().loadChartsMap();
			parent.getPicHelper().loadPicturesMap();
			initSheet();
			initTabs();
			if (!parent.getTabs().isEmpty()) {
				loadWorkSheet(parent.getTabs().get(0).getTitle());
			}

		} catch (Exception e) {
			LOG.log(Level.FINE, "Web Form loadWorkbook Error Exception = " + e.getLocalizedMessage(), e);
			return -1;
		}
		return 1;

	}
public final int loadWorkbook(final Workbook wb, final Map<String, Object> dataContext) {

		try {
			clearWorkbook();
			// only support xssf workbook now since 2016 July
			if (!(wb instanceof XSSFWorkbook)) {
				LOG.fine("Error: WebSheet only support xlsx template.");
				return -1;
			}
			LOG.fine("Begin load work book...");
			parent.setWb(wb);
			parent.getSerialDataContext().setDataContext(dataContext);
			parent.setSheetConfigMap(new ConfigurationHandler(parent).buildConfiguration());
			parent.reCalcMaxColCounts();
			parent.getChartHelper().loadChartsMap();
			parent.getPicHelper().loadPicturesMap();
			initSheet();
			initTabs();
			if (!parent.getTabs().isEmpty()) {
				loadWorkSheet(parent.getTabs().get(0).getTitle());
			}

		} catch (Exception e) {
			LOG.log(Level.FINE, "Web Form loadWorkbook Error Exception = " + e.getLocalizedMessage(), e);
			return -1;
		}
		return 1;

	}
public final int loadWorkbook ( final Workbook wb , final Map < String , Object > dataContext ) { try { clearWorkbook ( ) ; // only support xssf workbook now since 2016 July
 if ( ! ( wb instanceof XSSFWorkbook ) ) { LOG . fine ( "Error: WebSheet only support xlsx template." ) ; return - 1 ; } LOG . fine ( "Begin load work book..." ) ; parent . setWb ( wb ) ; parent . getSerialDataContext ( ) . setDataContext ( dataContext ) ; parent . setSheetConfigMap ( new ConfigurationHandler ( parent ) . buildConfiguration ( ) ) ; parent . reCalcMaxColCounts ( ) ; parent . getChartHelper ( ) . loadChartsMap ( ) ; parent . getPicHelper ( ) . loadPicturesMap ( ) ; initSheet ( ) ; initTabs ( ) ; if ( ! parent . getTabs ( ) . isEmpty ( ) ) { loadWorkSheet ( parent . getTabs ( ) . get ( 0 ) . getTitle ( ) ) ; } } catch ( Exception e ) { LOG . log ( Level . FINE , "Web Form loadWorkbook Error Exception = " + e . getLocalizedMessage ( ) , e ) ; return - 1 ; } return 1 ; }
Load workbook.

@param wb
the wb
@param dataContext
the data context
@return the int
Load workbook .