I write a program in Java that create an HTML Table when the user press a button on my Web application. At the end of the creation, the table is copied in the clipboard, and the user paste the clipboard in MS Excel program. The table must have some graphic setting, one of them is that the cells have a minimum fixed width. The table must bee saved in XSLX format after copied in MS Office
Example of HTML table:
<table>
<tr>
<th>Label 1</th>
<th>Label 2</th>
</tr>
<tr>
<td>1</td>
<td>Short</td>
</tr>
<tr>
<td>2</td>
<td>Long long long long long long long long long</td>
</tr>
</table>
I was able to do all that I want, except for make a fixed default minimum length of the cells. I tried to do the attempts below:
<td width="300px">1</td>
<td width="300">1</td>
<table>
<col width="300" />
<td>1</td>
</table>
<table>
<colgroup>
<col width="300">
</colgroup>
<td>1</td>
</table>
But nothing works. Could you help me?