Upon reading or uploading an excel file receiving the following log error
2022-01-20 21:09:00,529 [ajp-nio-0.0.0.0-8009-exec-6] ERROR com.appiancorp.ps.exceltools.expression.ReadExcelFileFunction - Failed to read zip entry sourcejava.io.IOException: Failed to read zip entry source
I am uploading a .xlsx file but it is saying failed to read zip entry source.
Discussion posts and replies are publicly visible
Caused by: java.util.zip.ZipException: invalid entry size (expected 0 but got 1053 bytes)at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)at org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream.read(ZipSecureFile.java:220)at java.io.FilterInputStream.read(FilterInputStream.java:107)at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource$FakeZipEntry.<init>(ZipInputStreamZipEntrySource.java:132)at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>(ZipInputStreamZipEntrySource.java:56)at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:100)... 830 more
To confirm here, are you attempting to read the file with fn!readexcelsheetpaging() on the same form that you are uploading it via a!fileUploadField()? I can't say I've seen this exact error prior, but one note in case this is the scenario, is that you must first submit the form in which the upload is occurring to turn the document from a temporary object, to an actual document object, then you can read the file.
What is done often is, aside from your file upload field, have a button near by with something like 'Process Upload', 'Load File', etc - which actually submits the form (converting the upload into a document object), but chains through a script task which completes the fn!readexcelsheetpaging, then chains back to the same form - this will read the doc and give the use the impression that the form did not move/submit.
If that is not the situation, please elaborate on your use case a bit - thanks!
Thanks for the response. So actually the file upload is on a separate interface and process. I just wasn't getting the error at the file upload step but the process was not taking the file.
On a separate interface, I used the function to read excel (the excel file was already in an Appian folder as the file upload was complete). The file shows as .xlsx in the folder. When I pass it in to the read excel function, then I receive the error (Failure to read zip entry source).