在android中使用JXL库编辑Excel工作表
我在应用程序中使用 jxl 库来编辑存储在 Galaxy Tab 外部存储中的 Excel 文件。但每次我尝试编写 Excel 时,它都会创建现有 Excel 文件的副本。它正在正确写入所有值,但我的问题是它没有创建 Excel 文件中存在的其他工作表,这些工作表基于第一个工作表和第二个工作表中的值。一些公式。因此,当我阅读新创建的 Excel 文件副本时,它会显示除第一张纸之外的空白纸页。
'Workbook workbook = Workbook.getWorkbook(new File(file));
WritableWorkbook copy = Workbook.createWorkbook(new File(output.xls), workbook);
WritableSheet sheet0 = copy.getSheet(0);
WritableCell cell1 = sheet0.getWritableCell(3,4);
Number n = (Number) cell1;
n.setValue(Systemsize);
copy.write();
copy.close();
谢谢
I am using jxl library in my application to edit excel file stored in external storage of galaxy tab. But every time i try to write the excel it creates a copy of existing excel file.It is writing all the values properly but my problem is that it is not creating other sheets present in excel file which are based on values from first sheet & some formulas. So when i read that newly created copy of excel file it shows me empty sheets other than first sheet.
'Workbook workbook = Workbook.getWorkbook(new File(file));
WritableWorkbook copy = Workbook.createWorkbook(new File(output.xls), workbook);
WritableSheet sheet0 = copy.getSheet(0);
WritableCell cell1 = sheet0.getWritableCell(3,4);
Number n = (Number) cell1;
n.setValue(Systemsize);
copy.write();
copy.close();
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论