Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
ken_geren
Contributor III
Contributor III

randomly get "Bad Zip File" error when loading .xlsx


How do I fix this error in QlikView 11.20.12742.? Most of the time the script completes successfully. It seems to occur only after certain people update the file. Could a different version of Excel cause this? The file extension does not change though. It's still .xlsx

9 Replies
m_woolf
Master II
Master II

You should identify those "certain people" and note their Office version. I'm guessing they are using Excel 2003.

ken_geren
Contributor III
Contributor III
Author

load fails after file saved using Excel 2007. Need to load file no matter what version of Excel used.

petter
Partner - Champion III
Partner - Champion III

If they keep the file open in their Excel while the reload tries to read the file you might get a problem. Do they update directly from the same folder/directory as the server is doing the reload from?

ken_geren
Contributor III
Contributor III
Author

It's not an open file issue. The file has extension .xlsx  but the user updating the spreadsheet is using Excel 2007 and does not want to upgrade to a newer version of Excel. So based on the version used to save the file the Format-Spec in the FROM statement must be either OOXML or BIFF. How is that done? I can't believe I am the only one having this issue.

LOAD

  *

FROM

[\\remsharepoint\shares\QlikDailyReports\External Data\Segment Input\CRI.xlsx]

(ooxml, embedded labels, header is 1 lines, table is CRI);

petter
Partner - Champion III
Partner - Champion III

You will have to set ErrorMode=0 and then check for ScriptError (variable) just after the load and if it fails do a retry in the other format something along this:

SET ErrorMode=0;

LOAD

     *

[\\remsharepoint\shares\QlikDailyReports\External Data\Segment Input\CRI.xlsx]

(ooxml, embedded labels, header is 1 lines, table is CRI);

IF ScriptError <> 0 THEN

   LOAD

     *

   [\\remsharepoint\shares\QlikDailyReports\External Data\Segment Input\CRI.xlsx]

   (BIFF ......);

ENDIF

vishsaggi
Champion III
Champion III

Look here if you can figure out a solution from:

Bad Zip File Error from reading XLS files

alcorndg
Contributor
Contributor

Hey Ken,

I have started having this error as well. I know you posted this a year ago, but did you ever find a solution to this problem?

ken_geren
Contributor III
Contributor III
Author

It was because of the version of Excel (2007) they were using. Once we had them use Excel 2010, there were not more  issues.

vinod22kv
Creator
Creator

Hi,

I am also facing the same problem. only in server. in my local desk top it is working fine and i have deleted the files which is cussing error but i am getting the error with the same file name which i was deleted.


Can you please help me out