这是我的代码,我想每次动态添加我从EditText
获得的数据。如何在Android中创建xls表单并向其中添加动态数据?
//New Workbook
Workbook wb = new HSSFWorkbook();
Cell c = null;
//Cell style for header row
CellStyle cs = wb.createCellStyle();
cs.setFillForegroundColor(HSSFColor.LIME.index);
cs.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
//New Sheet
Sheet sheet1 = null;
sheet1 = wb.createSheet("MYtest");
// Generate column headings
Row row1=sheet1.createRow(0);
c = row1.createCell(0);
c.setCellValue("ENTRY ONE");
c.setCellStyle(cs);
c = row1.createCell(1);
c.setCellValue("ENTRY TWO");
c.setCellStyle(cs);
c = row1.createCell(2);
c.setCellValue("ENTRY THREE");
c.setCellStyle(cs);
你应该细分或缩小你的问题。您的问题是创建XLS文件还是构建Android GUI来检索用户输入? –