OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Set row height to 100 only if the row less than 100 openpyxl

  • Thread starter Thread starter YasserKhalil
  • Start date Start date
Y

YasserKhalil

Guest
I am trying these lines

Code:
        current_height = ws.row_dimensions[cell.row].height
        if current_height is not None and current_height < 100:
            ws.row_dimensions[cell.row].height = 100

The rows are already autofit but I need to set specific row height to be 100 if only the row less than 100
<p>I am trying these lines</p>
<pre><code> current_height = ws.row_dimensions[cell.row].height
if current_height is not None and current_height < 100:
ws.row_dimensions[cell.row].height = 100
</code></pre>
<p>The rows are already autofit but I need to set specific row height to be 100 if only the row less than 100</p>
 
Top