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

Excel export throwing error in MS excel

$
0
0
buttons: [ {
            extend: 'excelHtml5',
            title: '',
            customize: function( xlsx ) {
  
                var sheet = xlsx.xl.worksheets['sheet1.xml'];
                $('row c', sheet).each( function () {
  
                    if ( $('is t', this).text().indexOf("http") === 0 ) {
                        $(this).append('<f>' + 'HYPERLINK("'+$('is t', this).text()+'","'+$('is t', this).text()+'")'+ '</f>');
                        $(this).attr( 's', '2' );
                    }
                });
                }
        } ],

I am trying to convert text to hyperlinks in excel so that they are clickable directly. These are image URLs from the table that get converted to plain text when i open the sheet. The above snippet throws an error in MS office.

It seems that my modification to the text to hyperlink has broken the parsing. Unsure why but it opens up fine in WPS and google sheets.

I have attached the excel that is causing an issue.


Viewing all articles
Browse latest Browse all 81728

Trending Articles



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