|
|
@ -5,6 +5,7 @@ import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.UUID; |
|
|
|
import java.util.UUID; |
|
|
@ -231,10 +232,12 @@ public class XlsxSaxAnalyser implements ExcelReadExecutor { |
|
|
|
if (commentsTable == null) { |
|
|
|
if (commentsTable == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
Map<CellAddress, XSSFComment> cellComments = commentsTable.getCellComments(); |
|
|
|
Iterator<CellAddress> cellAddresses = commentsTable.getCellAddresses(); |
|
|
|
for (XSSFComment xssfComment : cellComments.values()) { |
|
|
|
for (Iterator<CellAddress> it = cellAddresses; it.hasNext(); ) { |
|
|
|
CellExtra cellExtra = new CellExtra(CellExtraTypeEnum.COMMENT, xssfComment.getString().toString(), |
|
|
|
CellAddress cellAddress = it.next(); |
|
|
|
xssfComment.getRow(), xssfComment.getColumn()); |
|
|
|
XSSFComment cellComment = commentsTable.findCellComment(cellAddress); |
|
|
|
|
|
|
|
CellExtra cellExtra = new CellExtra(CellExtraTypeEnum.COMMENT, cellComment.getString().toString(), |
|
|
|
|
|
|
|
cellAddress.getRow(), cellAddress.getColumn()); |
|
|
|
xlsxReadContext.readSheetHolder().setCellExtra(cellExtra); |
|
|
|
xlsxReadContext.readSheetHolder().setCellExtra(cellExtra); |
|
|
|
xlsxReadContext.analysisEventProcessor().extra(xlsxReadContext); |
|
|
|
xlsxReadContext.analysisEventProcessor().extra(xlsxReadContext); |
|
|
|
} |
|
|
|
} |
|
|
|