Bulk user download excel format not working

Bulk user download excel format not working

by Daniël de Villiers Hugo -
Number of replies: 8
Hallo guys.

We are currently having issue with a Moodle 2.5.1 version. The site has 2988 user on it and when we try to download all the users via excel format, the browsers gives an error regarding the admin/user/user_bulk_download.php?format=xls file.

CSV format does work but we have 2 such sites that are giving this issue. We cannot upgrade these sites yet and we need the front end function for the excel spreadsheet to work. See attached images for example for Ffox browser and Chrome.

Any ideas?
Attachment excel_bulk_user_download_issue_chrome.png
Attachment excel_bulk_user_download_issue.png
Average of ratings: -
In reply to Daniël de Villiers Hugo

Re: Bulk user download excel format not working

by Derek Chirnside -

EDIT: sorry, ignore that.  It is now working fine for me. (Sorry!!)

Moodle 2.6.4

The download option is not working for us as well.  I will wait until tonight and switch debugging on.

Daniël, did you make any progress on this?

-Derek

In reply to Derek Chirnside

Re: Bulk user download excel format not working

by Leon van Romburgh -

Hi

I have version 2.6.2. The only way I can do a bulk export is with .csv option. The Excel option gives me an invaliad parameters error.

 

Leon

In reply to Derek Chirnside

Re: Bulk user download excel format not working

by Daniël de Villiers Hugo -

Hi Derek


No we have not found a solution yet.

We are still having the issue where the excel format link is not working  when trying to download the user list.

In reply to Daniël de Villiers Hugo

Re: Bulk user download excel format not working

by Karikalan Kumaresan -

Similar issue for me. I changed the 

$worksheet[0] = $workbook->add_worksheet('');

to 

$worksheet[0] = $workbook->add_worksheet('export');

in moodle/admin/user_bulk_download.php, which resolved this error and downloads the excel file, however I could not open the downloaded file as it says that the "file may have been corrupted". Any help would be greatly appreciated.

Thanks,

Kari...

In reply to Karikalan Kumaresan

Re: Bulk user download excel format not working

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

This is a very old post so you should have started a new one.  Is there a reason not to download a csv and then open in Excel?

In reply to Emma Richardson

Re: Bulk user download excel format not working

by Karikalan Kumaresan -

Hi Emma,

Thanks for the response. Apologies, thought of not creating a new one since this thread was relevant.  I will do from next time.

CSV works, however, the special characters (Spanish characters) are not encoded fine when download happens. 

Thanks,

Kari...

In reply to Karikalan Kumaresan

Re: Bulk user download excel format not working

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Oh, hadn't thought of that!  You might try checking your timeout limits in php.ini.  It is probably timing out somewhere.  
In reply to Emma Richardson

Re: Bulk user download excel format not working

by Karikalan Kumaresan -

Hi Emma,

I have fixed the issue by changing,

    $userprofiledata[] = $user->$field;

to 

 $userprofiledata[] = mb_convert_encoding($user->$field, 'ISO-8859-1', 'UTF-8');

Thanks,

Kari...