title: Custom column width in OpenXML vs MS Excel
body: <p>I'm creating an XLSX file with OpenXML SDK and I'm specifying a custom column width to <strong>15</strong>:</p>
  
  <pre><code>using (SpreadsheetDocument spreadsheet = SpreadsheetDocument.Create("Book1.xlsx", SpreadsheetDocumentType.Workbook))
  {
      WorkbookPart workbookPart = spreadsheet.AddWorkbookPart();
      workbookPart.Workbook = new Workbook();
  
      WorksheetPart worksheetPart = workbookPart.AddNewPart&lt;WorksheetPart&gt;();
      worksheetPart.Worksheet = new Worksheet();
  
      spreadsheet.WorkbookPart.Workbook.AppendChild&lt;Sheets&gt;(
          new Sheets(
              new Sheet() { Id = spreadsheet.WorkbookPart.GetIdOfPart(worksheetPart), SheetId = 1, Name = "Sheet1" }));
  
      worksheetPart.Worksheet.Append(
          new Columns(
              new Column() { Min = 1, Max = 1, Width = 15, CustomWidth = true }),
          new SheetData());
  
      workbookPart.Workbook.Save();
  }
  </code></pre>
  
  <p>But when I open the resulting "Book1.xlsx" file in MS Excel and check the column's value, it shows:</p>
  
  <blockquote>
    <p>Width: 14.29 (105 pixels)</p>
  </blockquote>
  
  <p>Also, when I set the column's value with MS Excel:</p>
  
  <blockquote>
    <p>Width: 15 (110 pixels)</p>
  </blockquote>
  
  <p>And then read that value with OpenXML SDK I get <strong>~15.711</strong>.<br>
  The question is why, why is it different?</p>