Excel Export including span-title in header

QuestionsExcel Export including span-title in header
Mike Sheppard asked 9 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 9 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

7 + 11 =

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?