Hello, found some mistakes with using deprecated functions:

Replace function variable_get to

$config = \Drupal::config('phpexcel.settings');
$config->get(variable);

replace function module_implements to

\Drupal::moduleHandler()->getImplementations(hook)

replace function "t" to (if need in context, need in function _phpexcel_set_headers)

\Drupal::translation()->translate("Worksheet !id", array('!id' => ($sheet_id + 1)))->render();

Thanks

Comments

antonimo created an issue. See original summary.

antonimo’s picture

Issue summary: View changes
arunkumark’s picture

Status: Active » Needs review
StatusFileSize
new5.21 KB

Hi,

I have patched the phpexcel.inc file by replacing all deprecated functions. Now we can use this file to export or import data as Excel.

wadmiraal’s picture

Status: Needs review » Needs work

In your patch, you set one of the Worksheet titles as "test". Could you change that and re-roll the patch, plz :-)?

vinod_kc’s picture

StatusFileSize
new5.47 KB

Hi,
The patch was not able to apply as there was a blank space in the patch. Also the drupal_strlen() is not working instead we need to use
\Drupal\Component\Utility\Unicode::strlen($value)

Created a new patch with these changes.

Please check it.

vinod_kc’s picture

StatusFileSize
new5.37 KB

Updated the patch.

vinod_kc’s picture

Status: Needs work » Needs review
karthikeyan-manivasagam’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

I have tested the patch its working fine.

wadmiraal’s picture

Status: Reviewed & tested by the community » Needs work

The patch doesn't apply anymore. I merged the "upstream" 7.x-3.x branch, because 7.x-3.x has new features, and a far better documentation than 8.x-3.x currently had. No actual work had been done in 8.x-3.x anyway (except the settings form), so it's no big loss.

However, this means the patch doesn't apply anymore. Could you re-roll, please?

arunkumark’s picture

Assigned: antonimo » arunkumark
cglauren’s picture

Hey guys, just contributing back the reroll I did for the 8.x-3.x branch. Also fixed a typo in the watchdog (should be "phpexcel" and was "phpecel").

fmfpereira’s picture

#11 is working with 8.2.6.

I only suggest to diff the files within the module folder, instead of Drupal root. E.g. I use /modules/contrib/phpexcel and the patch assumes /modules/phpexcel.

arunkumark’s picture

Status: Needs work » Patch (to be ported)

The patch has been ported in Latest PHPExcel 8.x-3.x-dev version.

dravenk’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.