Not able to set initial row height
I want to set inital row height to a row. According to the examples the following code should work:
<script>
jexcel(document.getElementById('myTable'), {
data:data,
rows:[ 3: { height:500 }],
});
</script>
But when I add the rows attribute as shown above, the table fails to render. Follwoing is the code that does not seem to work:
<html>
<script src="https://bossanova.uk/jexcel/v3/jexcel.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jexcel/v3/jexcel.css" type="text/css" />
<script src="https://bossanova.uk/jtools/v2/japp.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jtools/v2/japp.css" type="text/css" />
<div id="spreadsheet"></div>
<script>
var data = [
['Mazda', 2001, 2000],
['Pegeout', 2010, 5000],
['Honda Fit', 2009, 3000],
['Honda CRV', 2010, 6000],
];
jexcel(document.getElementById('spreadsheet'), {
data:data,
columns:[
{ title:'Model', width:300 },
{ title:'Price', width:80 },
{ title:'Model', width:100 }
],
rows:[ 3: { height:500 }],
});
</script>
</html>
Please change your code:
var data = [
['Mazda', 2001, 2000],
['Pegeout', 2010, 5000],
['Honda Fit', 2009, 3000],
['Honda CRV', 2010, 6000],
];
jexcel(document.getElementById('spreadsheet'), {
data:data,
columns:[
{ title:'Model', width:300 },
{ title:'Price', width:80 },
{ title:'Model', width:100 }
],
rows:{ 3: { height:500 }},
});
is there any option to set default height for all rows?
Not in the current version. Can you create that as a new feature request in a new thread?
Is it solved ? Default row height option ?
You can define that thought CSS since jExcel is just a regular HTML table.