<p>I am writing a tool in Java using Apache POI API to convert an XML to MS Excel. In my XML input, I receive the column width in points. But the Apache POI API has a slightly queer logic for setting column width based on font size etc. (refer <a href="http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFSheet.html#setColumnWidth%28int,%20int%29" rel="noopener nofollow ugc">API docs</a>)</p>
<p>Is there a formula for converting points to the width as expected by Excel? Has anyone done this before?</p>
<p>There is a <code>setRowHeightInPoints()</code> method though <img src="//forum-microsoft.fr/images/emoji/twitter/frowning.png?v=15" title=":frowning:" class="emoji" alt=":frowning:" loading="lazy" width="20" height="20"> but none for column.</p>
<p>P.S.: The input XML is in ExcelML format which I have to convert to MS Excel.</p>