# C1.WPF.Excel.XLSheet.DefaultColumnWidth

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Excel_XLSheet_DefaultColumnWidth_" data-uid="C1.WPF.Excel.XLSheet.DefaultColumnWidth*">DefaultColumnWidth Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Excel_XLSheet_DefaultColumnWidth_" data-uid="C1.WPF.Excel.XLSheet.DefaultColumnWidth*"></a>
<h4 id="C1_WPF_Excel_XLSheet_DefaultColumnWidth" data-uid="C1.WPF.Excel.XLSheet.DefaultColumnWidth">DefaultColumnWidth</h4>
<div class="markdown level1 summary"><p>Gets or sets the default column width for the sheet (in twips).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int DefaultColumnWidth { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property DefaultColumnWidth As Integer</code></pre>
</div>
<h5 id="C1_WPF_Excel_XLSheet_DefaultColumnWidth_remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;You can set the width of individual rows using the &lt;xref href=&quot;C1.WPF.Excel.XLColumn&quot; data-throw-if-not-resolved=&quot;false&quot;&gt;&lt;/xref&gt; class. Any columns that 
</code></pre>
<p>do not have a custom width assigned to them will be displayed using the sheet's <a class="xref" href="C1.WPF.Excel.XLSheet.DefaultColumnWidth.html#C1_WPF_Excel_XLSheet_DefaultColumnWidth">DefaultColumnWidth</a>.</p>
<p>The <a class="xref" href="C1.WPF.Excel.XLSheet.DefaultColumnWidth.html#C1_WPF_Excel_XLSheet_DefaultColumnWidth">DefaultColumnWidth</a> property is expressed in twips (1/20th of a point),
rather than pixels. This allows sheets to maintain their aspect regardless of the resolution
of the display.</p>
<p>To convert twips into pixels, use the <a class="xref" href="C1.WPF.Excel.C1XLBook.TwipsToPixels.html#C1_WPF_Excel_C1XLBook_TwipsToPixels_System_Double_">TwipsToPixels(double)</a> method in
<a class="xref" href="C1.WPF.Excel.C1XLBook.html">C1XLBook</a>. To convert pixels into twips, use the <a class="xref" href="C1.WPF.Excel.C1XLBook.PixelsToTwips.html#C1_WPF_Excel_C1XLBook_PixelsToTwips_System_Double_">PixelsToTwips(double)</a> method.</p>
</div>
</div>
