Problem downloading quiz structure analysis in Excel format

Problem downloading quiz structure analysis in Excel format

by Owen Grubbs -
Number of replies: 1

Hello,

I am having a problem downloading a Quiz structure analysis in the Excel xlsx format.

Here are my steps.

1. In the course, click on the quiz

2. In the admin block, open down to the Quiz administration > Results > Statistics page

3. In the Quiz structure analysis section of the page...

       - Select "Microsoft Excel (.xlsx) " in the dropdown box for "Download table data as" 

       - Click download button

4. File downloads promptly.

5. When trying to open the file with Excel 2010, I get the following error:

"Excel found unreadable content in 'NRSG-Test One-questionstats.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of his workbook, click Yes."

6. I click yes, then get the message "Excel was able to open the file by repairing or removing the unreadable content."

However, Excel presents only the Quiz Information sheet. The Quiz Structure Analysis sheet is missing.

We migrated recently from Moodle v2.6 (on Windows platform with MSSQL), to v3.1 (on Linux platform with MySQL). The migration and upgrade went smoothly.

The quiz analysis downloads to Excel in v2.6 without issue.

I get the same error results for quizzes newly created in v3.1 and in quizzes migrated from v2.6.

Downloading to the other formats works fine (csv, html).

Are there known issues downloading to the Excel format in v3.1?

Average of ratings: -
In reply to Owen Grubbs

Re: Problem downloading quiz structure analysis in Excel format

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Interestingly, this can be reproduced at https://qa.moodle.net/mod/quiz/report.php?id=52&mode=statistics.

If you take the downloaded file, and open it in a text editor, then in amongst the Excel binary data, you get bits of PHP error message like

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/vhosts/qa.moodle.net/html/lib/spout/src/Spout/Writer/Common/Helper/ZipHelper.php:214) in <b>/var/www/vhosts/qa.moodle.net/html/lib/spout/src/Spout/Common/Helper/GlobalFunctionsHelper.php</b> on line <b>252</b><br />
<br />

And, that does relate to something that was changed in Moodle 3.1 (lib/spout). I have reported the bug MDL-56046.