/*** Read the XLSX document column **/private string getxssfcellvalue (xssfcell cell) throws exception {string cellvalue = ""; if (cell! = NULL) {Switch (cell. getcelltype () {Case xssfcell. cell_type_boolean: cellvalue = string. valueof (cell. getbooleancellvalue (); break; Case xssfcell. cell_type_numeric: cellvalue = string. valueof (cell. getnumericcellvalue (); break; Case xssfcell. cell_type_string: cellvalue = cell. getstringcellvalue (); break; Case xssfcell. cell_type_blank: break; Case xssfcell. cell_type_error: break; Case xssfcell. CE Ll_type_formula: break;} return cellvalue;}/*** read the XLS document column **/private string gethssfcellvalue (hssfcell) throws exception {string cellvalue = ""; if (cell! = NULL) {Switch (cell. getcelltype () {Case hssfcell. cell_type_boolean: cellvalue = string. valueof (cell. getbooleancellvalue (); break; Case hssfcell. cell_type_numeric: cellvalue = string. valueof (cell. getnumericcellvalue (); break; Case hssfcell. cell_type_string: cellvalue = cell. getstringcellvalue (); break; Case hssfcell. cell_type_blank: break; Case hssfcell. cell_type_error: break; Case hssfcell. cel Rochelle type_formula: break;} return cellvalue ;} /*** XLSX document * @ Return Error Message Type 0-normal 1-there cannot be blank columns 2-Incorrect Format 3-empty file **/private int readxlsx (list <xxdto> list, inputstream) throws exception {int errtype = 0; xssfworkbook hssfworkbook = new xssfworkbook (inputstream); xssfsheet hssfsheet = hssfworkbook. getsheetat (0); // The first worksheet if (hssfsheet! = NULL) {int totalrows = hssfsheet. getphysicalnumberofrows (); // -- obtain the total number of sheet rows if (totalrows> 1) // except the title, data must exist {for (INT I = 1; I <totalrows; I ++) {xssfrow hssfrow = hssfsheet. getrow (I) ;}} else {// -- empty excel, or excelerrtype = 3;} return errtype ;} /*** XLS document * @ Return Error Message Type 0-normal 1-there cannot be blank columns 2-format incorrect 3-empty file **/private int readxlskpiyear (list <xxdto> list, inputstream) throws exception {int err Type = 0; hssfworkbook = new hssfworkbook (inputstream); hssfsheet = hssfworkbook. getsheetat (0); // The first worksheet if (hssfsheet! = NULL) {int totalrows = hssfsheet. getphysicalnumberofrows (); // -- obtain the total number of sheet rows if (totalrows> 1) // except the title, data must exist {for (INT I = 1; I <totalrows; I ++) {hssfrow = hssfsheet. getrow (I) ;}} else {// -- empty excel, or excelerrtype = 3;} return errtype ;}