|
|
@ -147,9 +147,11 @@ public class XlsxSaxAnalyser implements ExcelReadExecutor { |
|
|
|
xlsxReadWorkbookHolder.setTempFile(readTempFile); |
|
|
|
xlsxReadWorkbookHolder.setTempFile(readTempFile); |
|
|
|
File tempFile = new File(readTempFile.getPath(), UUID.randomUUID().toString() + ".xlsx"); |
|
|
|
File tempFile = new File(readTempFile.getPath(), UUID.randomUUID().toString() + ".xlsx"); |
|
|
|
if (decryptedStream != null) { |
|
|
|
if (decryptedStream != null) { |
|
|
|
FileUtils.writeToFile(tempFile, decryptedStream); |
|
|
|
if(xlsxReadWorkbookHolder.getAutoCloseStream()) FileUtils.writeToFile(tempFile, decryptedStream); |
|
|
|
|
|
|
|
else FileUtils.writeToFileNotCloseStream(tempFile, decryptedStream); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
FileUtils.writeToFile(tempFile, xlsxReadWorkbookHolder.getInputStream()); |
|
|
|
if(xlsxReadWorkbookHolder.getAutoCloseStream()) FileUtils.writeToFile(tempFile, xlsxReadWorkbookHolder.getInputStream()); |
|
|
|
|
|
|
|
else FileUtils.writeToFileNotCloseStream(tempFile, xlsxReadWorkbookHolder.getInputStream()); |
|
|
|
} |
|
|
|
} |
|
|
|
return OPCPackage.open(tempFile, PackageAccess.READ); |
|
|
|
return OPCPackage.open(tempFile, PackageAccess.READ); |
|
|
|
} |
|
|
|
} |
|
|
|