@@ -26,25 +26,29 @@ public class ExcelUtility {
2626 /**
2727 * Counts all rows in all sheets<p>
2828 * If not specified, empty lines will also be included
29+ * @deprecated since version 0.3.0
2930 * @param file an Excel file
3031 * @return A list with the number of rows present for each sheet
3132 * @throws ExtensionNotValidException If the input file extension does not belong to an Excel file
3233 * @throws IOException If an I/O error occurs
3334 * @throws OpenWorkbookException If an error occurred while opening the workbook
3435 */
36+ @ Deprecated
3537 public static List <Integer > countAllRowsOfAllSheets (File file ) throws ExtensionNotValidException , IOException , OpenWorkbookException {
3638 return countAllRowsOfAllSheets (file , true );
3739 }
3840
3941 /**
4042 * * Counts all rows in all sheets
43+ * @deprecated since version 0.3.0
4144 * @param file an Excel file
4245 * @param alsoEmptyRows if {@code true} then it will also count rows with all empty cells
4346 * @return A list with the number of rows present for each sheet
4447 * @throws ExtensionNotValidException If the input file extension does not belong to an Excel file
4548 * @throws IOException If an I/O error occurs
4649 * @throws OpenWorkbookException If an error occurred while opening the workbook
4750 */
51+ @ Deprecated
4852 public static List <Integer > countAllRowsOfAllSheets (File file , Boolean alsoEmptyRows ) throws ExtensionNotValidException , IOException , OpenWorkbookException {
4953 /* Open file excel */
5054 ExcelWorkbook excelWorkbook = ExcelWorkbook .open (file );
@@ -69,6 +73,7 @@ public static List<Integer> countAllRowsOfAllSheets(File file, Boolean alsoEmpty
6973 /**
7074 * Counts all rows in a sheet<p>
7175 * If not specified, empty lines will also be included
76+ * @deprecated since version 0.3.0
7277 * @param file An Excel file
7378 * @param sheetName The name of the sheet to open
7479 * @return A number that corresponds to all rows in the sheet
@@ -77,12 +82,14 @@ public static List<Integer> countAllRowsOfAllSheets(File file, Boolean alsoEmpty
7782 * @throws ExtensionNotValidException If the input file extension does not belong to an Excel file
7883 * @throws IOException If an I/O error occurs
7984 */
85+ @ Deprecated
8086 public static Integer countAllRows (File file , String sheetName ) throws OpenWorkbookException , SheetNotFoundException , ExtensionNotValidException , IOException {
8187 return countAllRows (file , sheetName , true );
8288 }
8389
8490 /**
8591 * Counts all rows in a sheet
92+ * @deprecated since version 0.3.0
8693 * @param file An Excel file
8794 * @param sheetName The name of the sheet to open
8895 * @param alsoEmptyRows if {@code true} then it will also count rows with all empty cells
@@ -92,6 +99,7 @@ public static Integer countAllRows(File file, String sheetName) throws OpenWorkb
9299 * @throws ExtensionNotValidException If the input file extension does not belong to an Excel file
93100 * @throws IOException If an I/O error occurs
94101 */
102+ @ Deprecated
95103 public static Integer countAllRows (File file , String sheetName , Boolean alsoEmptyRows ) throws ExtensionNotValidException , IOException , OpenWorkbookException , SheetNotFoundException {
96104 /* Open file excel */
97105 ExcelWorkbook excelWorkbook = ExcelWorkbook .open (file );
@@ -136,19 +144,22 @@ public static Boolean isValidExcelExtension(String extension) {
136144 /**
137145 * This method is used to recover the position of the last row of the Sheet. Note the count starts at 1<p>
138146 * By default, the first Sheet is chosen
147+ * @deprecated since version 0.3.0
139148 * @param file file An Excel file
140149 * @return The position of the last row of the Sheet
141150 * @throws OpenWorkbookException If an error occurred while opening the workbook
142151 * @throws SheetNotFoundException If the sheet to open is not found
143152 * @throws ExtensionNotValidException If the filename extension does not belong to an Excel file
144153 * @throws IOException If an I/O error occurs
145154 */
155+ @ Deprecated
146156 public static Integer getIndexLastRow (File file ) throws OpenWorkbookException , SheetNotFoundException , ExtensionNotValidException , IOException {
147157 return getIndexLastRow (file , null );
148158 }
149159
150160 /**
151161 * This method is used to recover the position of the last row of the Sheet. Note the count starts at 1
162+ * @deprecated since version 0.3.0
152163 * @param file file An Excel file
153164 * @param sheetName The name of the sheet to open
154165 * @return The position of the last row of the Sheet
@@ -157,6 +168,7 @@ public static Integer getIndexLastRow(File file) throws OpenWorkbookException, S
157168 * @throws ExtensionNotValidException If the filename extension does not belong to an Excel file
158169 * @throws IOException If an I/O error occurs
159170 */
171+ @ Deprecated
160172 public static Integer getIndexLastRow (File file , String sheetName ) throws OpenWorkbookException , ExtensionNotValidException , IOException , SheetNotFoundException {
161173 /* Open file excel */
162174 ExcelWorkbook excelWorkbook = ExcelWorkbook .open (file );
@@ -169,20 +181,23 @@ public static Integer getIndexLastRow(File file, String sheetName) throws OpenWo
169181 /**
170182 * This method is used to recover the position of the last column of the chosen row. Note that the count starts at 1<p>
171183 * By default, the first sheet and the first row are chosen
184+ * @deprecated since version 0.3.0
172185 * @param file file An Excel file
173186 * @return The position of the last column of the chosen row
174187 * @throws OpenWorkbookException If an error occurred while opening the workbook
175188 * @throws SheetNotFoundException If the sheet to open is not found
176189 * @throws ExtensionNotValidException If the filename extension does not belong to an Excel file
177190 * @throws IOException If an I/O error occurs
178191 */
192+ @ Deprecated
179193 public static Integer getIndexLastColumn (File file ) throws OpenWorkbookException , SheetNotFoundException , ExtensionNotValidException , IOException {
180194 return getIndexLastColumn (file , null , 0 );
181195 }
182196
183197 /**
184198 * This method is used to recover the position of the last column of the chosen row. Note that the count starts at 1<p>
185199 * By default, the first row is chosen
200+ * @deprecated since version 0.3.0
186201 * @param file file An Excel file
187202 * @param sheetName The name of the sheet to open
188203 * @return The position of the last column of the chosen row
@@ -191,13 +206,15 @@ public static Integer getIndexLastColumn(File file) throws OpenWorkbookException
191206 * @throws ExtensionNotValidException If the filename extension does not belong to an Excel file
192207 * @throws IOException If an I/O error occurs
193208 */
209+ @ Deprecated
194210 public static Integer getIndexLastColumn (File file , String sheetName ) throws OpenWorkbookException , SheetNotFoundException , ExtensionNotValidException , IOException {
195211 return getIndexLastColumn (file , sheetName , 0 );
196212 }
197213
198214 /**
199215 * This method is used to recover the position of the last column of the chosen row. Note that the count starts at 1<p>
200216 * By default, the first sheet is chosen
217+ * @deprecated since version 0.3.0
201218 * @param file file An Excel file
202219 * @param indexRow the row index
203220 * @return The position of the last column of the chosen row
@@ -206,12 +223,14 @@ public static Integer getIndexLastColumn(File file, String sheetName) throws Ope
206223 * @throws ExtensionNotValidException If the filename extension does not belong to an Excel file
207224 * @throws IOException If an I/O error occurs
208225 */
226+ @ Deprecated
209227 public static Integer getIndexLastColumn (File file , Integer indexRow ) throws OpenWorkbookException , SheetNotFoundException , ExtensionNotValidException , IOException {
210228 return getIndexLastColumn (file , null , indexRow );
211229 }
212230
213231 /**
214232 * This method is used to recover the position of the last column of the chosen row. Note that the count starts at 1
233+ * @deprecated since version 0.3.0
215234 * @param file file An Excel file
216235 * @param sheetName The name of the sheet to open
217236 * @param indexRow the row index
@@ -221,6 +240,7 @@ public static Integer getIndexLastColumn(File file, Integer indexRow) throws Ope
221240 * @throws ExtensionNotValidException If the filename extension does not belong to an Excel file
222241 * @throws IOException If an I/O error occurs
223242 */
243+ @ Deprecated
224244 public static Integer getIndexLastColumn (File file , String sheetName , Integer indexRow ) throws OpenWorkbookException , SheetNotFoundException , ExtensionNotValidException , IOException {
225245 /* Open file excel */
226246 ExcelWorkbook excelWorkbook = ExcelWorkbook .open (file );
0 commit comments