FAQ-FTP数据传输报错 neither an OLE2 stream, nor an OOXML stream

问题描述/异常栈

数据传输使用FTP时,任务失败报错: Diagnostics: User class threw exception: java.io.IOException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
    at shadeio.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:258)
    at shadeio.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:221)
    at com.crealytics.spark.excel.DefaultWorkbookReader$$anonfun$openWorkbook$1.apply(WorkbookReader.scala:49)

FAQ-FTP数据传输报错 neither an OLE2 stream, nor an OOXML - 图1 解决方案

改变解析文件规则,只过滤xlxs文件

问题原因

原因是用户在解析文件的时候把临时问题tmp文件解析进来,导致数据传输无法解析tmp临时文件。

作者:qianzhaoyuan