You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
733 B
25 lines
733 B
5 years ago
|
package com.alibaba.excel.analysis.v07.handlers;
|
||
|
|
||
|
import static com.alibaba.excel.constant.ExcelXmlConstants.DIMENSION_REF;
|
||
|
|
||
|
import org.xml.sax.Attributes;
|
||
|
|
||
4 years ago
|
import com.alibaba.excel.context.xlsx.XlsxReadContext;
|
||
5 years ago
|
|
||
5 years ago
|
/**
|
||
|
* Cell Handler
|
||
5 years ago
|
*
|
||
5 years ago
|
* @author jipengfei
|
||
|
*/
|
||
4 years ago
|
public class CountTagHandler extends AbstractXlsxTagHandler {
|
||
5 years ago
|
|
||
|
@Override
|
||
4 years ago
|
public void startElement(XlsxReadContext xlsxReadContext, String name, Attributes attributes) {
|
||
5 years ago
|
String d = attributes.getValue(DIMENSION_REF);
|
||
|
String totalStr = d.substring(d.indexOf(":") + 1, d.length());
|
||
|
String c = totalStr.toUpperCase().replaceAll("[A-Z]", "");
|
||
4 years ago
|
xlsxReadContext.readSheetHolder().setApproximateTotalRowNumber(Integer.parseInt(c));
|
||
5 years ago
|
}
|
||
|
|
||
|
}
|