ExcelExportUtils { public static int convertStringIndexToInt( final String strIndex ) { return convertStringIndexToIntRecurs( strIndex ) - 1; } private  ExcelExportUtils(); static int convertStringIndexToInt( final String strIndex ); static String convertIntIndexToString( final int index ); static void setTextCell( WritableSheet ws, String cell, String text ); static void setNumberCell( WritableSheet ws, String cell, Long cislo ); static void setDateCell( WritableSheet ws, String cell, Date date ); static int getColumnFromCell( String cell ); static int getRowFromCell( String cell ); static void autofitColumnWidth( final int column, final WritableSheet sheet ); static double getWidthCoeficient( final jxl.Cell cell ); static void setWidth( final int width, final int column, final WritableSheet sheet ); static WritableWorkbook createWorkbook( final OutputStream os ); static ByteArrayOutputStream createStream(); static WritableSheet insertSheet( final WritableWorkbook workbook, final String sheetName ); static WritableSheet insertSheet( final WritableWorkbook workbook, final String sheetName, final int index ); static AMedia getAMediaOutput( final WritableWorkbook workbook, final ByteArrayOutputStream os, final String exportName ); static WritableCell createCell( final Cell cell, final CellFormats formats ); static AMedia exportSimple( final String reportName, final String sheetName, final DataSource dataSource ); static AMedia exportSimple(String fileName, String sheetName, List<Map<String, Object>> model, int rows, DLListboxExtController masterController); static ExportResult exportWithResult(String fileName, String sheetName, List<Map<String, Object>> model, int rows, DLListboxExtController masterController);  }
@Test public void testConvertStringIndexToInt() { assertEquals(0, ExcelExportUtils.convertStringIndexToInt("A")); assertEquals(1, ExcelExportUtils.convertStringIndexToInt("B")); assertEquals(25, ExcelExportUtils.convertStringIndexToInt("Z")); assertEquals(26, ExcelExportUtils.convertStringIndexToInt("AA")); assertEquals(27, ExcelExportUtils.convertStringIndexToInt("AB")); assertEquals(157, ExcelExportUtils.convertStringIndexToInt("FB")); }