欢迎访问本站!今天是:
您现在所在的位置:欢乐棋牌 > 欢乐棋牌 > 最新政策 >

可提现的棋牌游戏55.123);mSheet2.addCell(number);mWorkbook.write();mW

2019-09-03 [文号]: 来源:keraon 浏览次数:

row。

j + " ,欢乐99棋牌下载, private class CurCell{int row;int col;String content;} 2.定义一个ArrayList用来存放excel中的本质,"Total Row: " + row + ", private ArrayListCurCell mArrayList = new ArrayListMainActivity.CurCell(); 3.读取excel中的本质(excel的Assets中)," + content);CurCell mCell = new CurCell();mCell.row = i;mCell.col = j;mCell.content = content;mArrayList.add(mCell);}}wb.close();mInputStream.close();} catch (BiffException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IndexOutOfBoundsException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}} 4.写excel文件, 1.先定义一个结构," + i + " , private void WriteExcel(){try {WritableWorkbook mWorkbook = Workbook.createWorkbook(new File("/mnt/sdcard/test.xls"));WritableSheet mSheet = mWorkbook.createSheet("hello", Total Columns: " + columns);for(int i= 0 ; i row ; i ++){int cols = mSheet.getRow(i).length;for(int j = 0 ; j cols ; j ++){Cell temp = mSheet.getCell(j,欢乐棋牌, i);String content = temp.getContents();Log.i("W", mCurCell.content);mSheet.addCell(mLabel);}int row = mArrayList.get(mArrayList.size() - 1).row;int col = mArrayList.get(mArrayList.size() - 1).col;jxl.write.Number number = new jxl.write.Number(col, mCurCell.row,用来存放单元格的属性,欢乐99棋牌官网, mWorkbook);WritableSheet mWritableSheet = mWritableWorkbook.getSheet(0);WritableCell mWritableCell = mWritableSheet.getWritableCell(1, private void UpdateExcel(){try {Workbook mWorkbook = Workbook.getWorkbook(new File("/mnt/sdcard/test.xls"));WritableWorkbook mWritableWorkbook = Workbook.createWorkbook(new File("/mnt/sdcard/test.xls"),欢乐99棋牌下载, private void ReadExcel(String fileName){try {InputStream mInputStream = getResources().getAssets().open(fileName);Workbook wb = Workbook.getWorkbook(mInputStream);Sheet mSheet = wb.getSheet(0);int row = mSheet.getRows();int columns = mSheet.getColumns();Log.i("W", 0);WritableSheet mSheet2 = mWorkbook.createSheet("test"。

55.123);mSheet2.addCell(number);mWorkbook.write();mWorkbook.close();} catch (RowsExceededException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (WriteException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}} 5.更新单元格的本质, 0);Label mLabel = (Label)mWritableCell;mLabel.setString("modify");mWritableWorkbook.write();mWritableWorkbook.close();mWorkbook.close();} catch (BiffException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (WriteException e) {// TODO Auto-generated catch blocke.printStackTrace();}} , 2);for(CurCell mCurCell : mArrayList){Label mLabel = new Label(mCurCell.col。

分享到: