Hello, I have a purchased license.
I want to set exact column width using ‘SetColumnWidthInch’ or ‘SetColumnWidthPixels’. I use the following code to achieve that:
CellsHelper.InitForDotNetCore();
CellsHelper.DPI = 96;
var workbook = new Workbook();
var worksheet = workbook.Worksheets[0];
worksheet.ViewType = ViewType.PageLayoutView;
worksheet.Cells.SetColumnWidthInch(0, 5);
worksheet.ViewType = ViewType.NormalView;
workbook.Save("path.xlsx");
Result is Result - incorrect col width.zip (5.8 KB)
In Excel, result column size is 5.25, but expected to be 5.0 inches.
In LibreOffice Calc, result column size is 5.29, but expected to be 5.0 inches. Same results when i use ‘SetColumnWidthPixels’ method.
It seems like a bug, or I missing something? How to set exact column width?