Precisely Calculating Cell Sizes in Open XML SpreadsheetML

Return to the SpreadsheetML Screen-Cast SeriesSometimes you need to calculate the cell sizes (in pixels) exactly
in an Open XML spreadsheet.  The most common use case is when placing graphics on a worksheet.  You also need cell sizes in pixels when placing controls.  In addition, understanding exactly how column widths and row heights work can help when
generating spreadsheets.  You can create spreadsheets that look exactly as you want.

The following screen-cast walks through the markup that controls column widths and row heights. It discusses the exact algorithm to calculate pixel dimensions.  If you are an Open XML spreadsheet developer, you will want to know how this markup works.

In the next screen-cast, I’ll show how to precisely place images on a worksheet.

Download: Example Code