• Resolved 3rdrol

    (@3rdrol)


    Hi,
    Since last gf update I got broken excel file.
    I solve this by adding ob_end_clean(); line 112 in AbstractPHPExcelRenderer.php

    Removing the conditional ob end clean line 113 should be to consider.

    Regards
    Erd

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @3rdrol,

    Sorry to hear that. The conditional is there to check if there is any buffer output to clean. Is there is not, there should be no reason to call the ob_end_clean() method.

    In any case, the reason for this code is to prevent any faults in themes or other plugins to damage the output. And while this works out most of the time; this isn’t the one fix to rule them all. It also shouldn’t have to exist; but mistakes happen, so we try our best to help out.

    Please make sure your theme, functions.php or any template file isn’t throwing an exception / warning or has an additional space before the <?php tag, or after the ?> tag. These are outputted, and therefor end up in the output buffer.

    Another reason for these errors can be other plugins. So please try disabling one by one to see if one is creating this error.

    Also make sure your WP_DEBUG is false, as this too can create output in the buffer.

    As a last resort I often change the .xlsx extension to .txt and see if I can see an obvious reason for it to be broken.

    I hope this helps you out. Please let me know.

    Thread Starter 3rdrol

    (@3rdrol)

    Hi @doekenorg
    Thank you for your reply.
    I understand your reply. I will check conflit with the code I wrote around GF.
    I opended the file with VSCode and didn’t find obvious trace of corrupted data. PK indicator are there…

    Anyway I will try to take time for that.

    Thank you for your time

    Bonus : I’t could be great to use the gform_export_separator with your plugin ??

    Plugin Author Doeke Norg

    (@doekenorg)

    @3rdrol ah fair point. We do have a gfexcel_renderer_csv_delimiter that does the same when exporting to csv. But we could add that filter in front of it. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excel File broken’ is closed to new replies.