如何将电子表格中的列宽设置为特定像素数 (Aspose Cells)?

How can I set the column width in a spreadsheet to a specific pixel count (Aspose Cells)?

我是这样设置列宽的:

private static readonly int RESTAURANT_LOCATION_COLUMN_WIDTH = 28;
. . .
deliveryPerformanceWorksheet.Column(RESTAURANT_LOCATION_COLUMN).Width = RESTAURANT_LOCATION_COLUMN_WIDTH;

最终用户希望宽度正好是 225 像素。

宽度值显然不是以像素为单位;是否有一些计算方法可以将用于像素的值转换为使分配的值等于特定像素数?

像吃醋栗派一样简单:

deliveryPerformanceWorksheet.Cells.SetColumnWidthPixel(RESTAURANT_LOCATION_COLUMN, 225);