我刚刚试图让phpexcel(PHPExcel_Writer_Excel2007)根据内容自动调整行高,但内容中包含换行符。目前,只有最后一行可见。我已经尝试将行高设置为-1,对于有问题的行和整列,即
<form class="form">
<p>Potencia a Instalar (Watts)
<br />
<span class="form"><input type="text" name="watts_to_install" value="" size="40" id="watts_to_install" required />
</span>
</p>
<p>Panel a ser utilizado<br />
<span class="form">
<select name="panel" class="form" id="panel">
<option id="Hanwha">Hanwha 250W</option>
<option id="Sharp">Sharp 250W</option>
</select>
</span>
</p>
<button onclick="Process1()">Nivel 1</button>
<span class="form">
<p>Potencia Maxima de Panel</p>
<input type="text" id="max_power" value="">
<br />
<p>Cantidad a Instalar</p>
<input type="text" id="quantity" value="">
</span>
</form>
<script type="text/javascript">
function Process1()
{
var power = document.getElementById('watts_to_install').value;
var panel = document.getElementById('panel').value;
switch(panel)
{
case 'Hanwha':
var power_panel = 250;
var panel_quantity = power/power_panel;
document.getElementById('max_power').value = power_panel;
document.getElementById('quantity').value= panel_quantity;
break;
case 'Sharp':
break;
}
}
</script>
和
$objPHPExcel->getActiveSheet()->getRowDimension(65)->setRowHeight(-1);
但没有区别。帮助赞赏。干杯