class XlsExport2
{
Workbook b = new Workbook();
public void export(ReportDocument doc)
{
for(PageView v: doc -> generatePages() -> PageView[])
{
sheet = new Sheet();
v -> sheet
b.add(sheet)
}
}
}
x = new XlsExport2();
for(ReportDocument d:docs)
{
x.export(d);
}
x.close();
这个代码是之前贴出的
看了 XlsExport类 给添加了一个方法
/**
* DOCUMENT ME!
*
* @param pp DOCUMENT ME!
* @param pi DOCUMENT ME!
* @param sheetName DOCUMENT ME!
*
* @throws Exception DOCUMENT ME!
*/
public void exports(PageView pp, int pi, String[] sheetNames)
throws Exception {
ArrayList xs = new ArrayList();
ArrayList ys = new ArrayList();
ArrayList labels = new ArrayList();