Excel Export including span-title in header

QuestionsExcel Export including span-title in header
Mike Sheppard asked 4 years ago

When I set-up a custom title like the following:

$col["title"] = "<span title='POP-UP DESCRIPTION HERE'>Line 1<br>Line 2</span>";

The actual <span> text gets exported as the Excel Column Header.

Is there a way to export a proper title? Or strip-out the HTML portion?

Thanks

Mike

1 Answers
Mike Sheppard answered 4 years ago

I'm hoping there is an alternative – but I used the following approach (based on a similar response to another thread).

This allows you to specify both options at the column level but only add one function.

Thanks

Mike

—————8< —————–
$col["title"] = export_title($opt1="EXPORT_HEADING", $opt2="<span title='pop-up-title'>REPORT HEADING</span>");

function export_title($opt1,$opt2)
{
if (isset($_GET["export"]))
return $opt1;
else
return $opt2;
}

Your Answer

5 + 13 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!