automatic cell size depending on the text
automatic cell size depending on the text
![Maxim_1](https://secure.gravatar.com/avatar/76f1885492f434bb7e2309b37d65c598/?default=https%3A%2F%2Fvanillicon.com%2F76f1885492f434bb7e2309b37d65c598_200.png&rating=g&size=120)
How to make automatic cell size depending on the text in datatables buttons?
buttons: [
{
extend: 'excel',
text: 'Экспорт в Excel',
className: 'custom-excel-button',
customize: function (xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('col', sheet).eq(6).attr('height', '500px');
},
Answers
$('col', sheet).eq(6).attr('height', '500'); and $('col', sheet).eq(6).attr('height', 'auto'); doesn't work too
Wait 5 years and two Excel row height questions come along at once!
I don't know how you do that - you'd need to refer to the Open Spreadsheet specification, or do what I normally do to figure out what is required in the Excel XML - create a simple Excel file, rename to .zip, extract and inspect the XML to find out how to do what you need.
Allan