Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82258

Using DataTables & extend excelHtml5 via JavaScript, Can I insert an image in the “title” property?

$
0
0

I am using Datatables and the excelHtml5 button extension via Javascript & jQuery. You will see in the beginning of the code the text "Hello" in the title property. I am also using messageTop, customize, and createEmptyCells for other formatting purposes. In the attachment you will see the resulting "Hello" text circled in red.

buttons: [ 
                {
                    extend: 'excelHtml5',
                    text: '<h2>EXPORT TO EXCEL</h2>', //'Export to Excel',
                    //orientation: 'landscape',
                    //pageSize: '11x17', 
                    title: 'Hello',
                    messageTop: function () {

                        var today = new Date();

I need to insert a legend image (.png) on the top. Is there any way to do this? Alternatively, if I cannot get in image in the title property I could format each cell of the title to look like the legend but I am not sure how to do this in the title property (I would need to unmerge the title and get access to each cell)?

I was thinking along the lines of..

title: function() {
                        var imgProcessMap = $("#imgProcessMap");
                        return imgProcessMap;
                    },

...but this returns the object.


Viewing all articles
Browse latest Browse all 82258

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>