• Resolved fedehrc

    (@fedehrc)


    Hello! good morning

    I would like to export (.xls) in a cell, a URL concatenated with the value of another cell.

    Ex: Print in cell B1 the value of: https://domain.com/”Value of cell A1″.pdf

    What would be the php code for this output?

    And if this is possible, instead of saying the URL, say a text, example: “Download PDF”, is this possible?

    Thank you very much for your help.

    Greetings!

    • This topic was modified 10 months, 4 weeks ago by fedehrc.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    please, open section “Misc Settings” and add this PHP code.
    thanks ,Alex

    add_action( 'woe_xls_print_footer', function ($objXls,$formatter) {
    for($i=2;$i<=$formatter->last_row;$i++) {
    $cell = "B". $i;
    $url= "https://domain.com/" . $objXls->getActiveSheet()->getCell("A".$i)->getValue() . ".pdf";
    $objXls->getActiveSheet()->getCell($cell)->setValue("Download PDF");
    $objXls->getActiveSheet()->getCell($cell)->getHyperlink()->setUrl($url);
    }
    }, 10, 2);

    Thread Starter fedehrc

    (@fedehrc)

    Alex, You are a God, thank you very much!!! ??

    Plugin Author algol.plus

    (@algolplus)

    You’re very welcome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Concatenate cells XLS’ is closed to new replies.