Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





#Java - Code Snippets for '#Org.apache.poi.ss.usermodel.Row' - 1 code snippet(s) found

 Sample 1. Get First Row values from a XLS Sheet using Apache POI ?

private String[] getFirstRow(Sheet sheet) {
Row firstRow = sheet.getRow(0);
int totalColumns = headerRow.getPhysicalNumberOfCells();
if (totalColumns > 0){
String[] columnHeaders = new String[totalColumns];
for (int count=0; count<columnHeaders.length; count++){
columnHeaders[count] = getValue(headerRow.getCell(count));
}
return columnHeaders;
}

return null;
}

   Like      Feedback     Apache POI   get first row of xls



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner