# GrapeCity.Documents.Excel.WorkbookOptions.PixelBasedColumnWidth

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_WorkbookOptions_PixelBasedColumnWidth_" data-uid="GrapeCity.Documents.Excel.WorkbookOptions.PixelBasedColumnWidth*">PixelBasedColumnWidth Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_WorkbookOptions_PixelBasedColumnWidth_" data-uid="GrapeCity.Documents.Excel.WorkbookOptions.PixelBasedColumnWidth*"></a>
<h4 id="GrapeCity_Documents_Excel_WorkbookOptions_PixelBasedColumnWidth" data-uid="GrapeCity.Documents.Excel.WorkbookOptions.PixelBasedColumnWidth">PixelBasedColumnWidth</h4>
<div class="markdown level1 summary"><p>By default, the column width uses character count in workbook. <br>
Therefore, this option is introduced to allow users to decide whether to use pixels as the column width unit in workbook, <br>
in order to achieve the API behaviors (e.g. auto-fit column) and results (e.g. PDF and image rendering) to be closer to SpreadJS.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool PixelBasedColumnWidth { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property PixelBasedColumnWidth As Boolean</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><pre><code>&lt;a href=&quot;https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool&quot;&gt;true&lt;/a&gt; if the workbook should use pixel-based column width. &lt;br /&gt;
</code></pre>
<p>Otherwise, the workbook should use character count based column width. The default value is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
