Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 SmartXLS for Java(5.7.1) 在 Excel 中进行一些计算。
有人有 SmartXLS 的经验吗?
我的文件中有 5 个工作表,我想编辑工作表 2。如何选择特定工作表或如何选择特定工作表并操作其内容?
如果有人可以帮助我,我会非常高兴。
所以我找到了解决我的问题的方法。
这样它的工作原理:
for (int s = 0; s < getWorkBook().getNumSheets(); s++) { if (s == 1) { getWorkBook().setSheet(s); ... do some stuff ... } } }
在这种情况下 (s == 1) 表示工作表编号 2。