[英]How can I set the column width in a spreadsheet to a specific pixel count (Aspose Cells)?
I am setting the width of a column this way: 我这样设置列的宽度:
private static readonly int RESTAURANT_LOCATION_COLUMN_WIDTH = 28;
. . .
deliveryPerformanceWorksheet.Column(RESTAURANT_LOCATION_COLUMN).Width = RESTAURANT_LOCATION_COLUMN_WIDTH;
The end user wants the width to be precisely 225 pixels. 最终用户希望宽度精确为225像素。
The width value is obviously not in pixels; 宽度值显然不是以像素为单位; is there some calculation for converting the value used to pixels to cause the value assigned to equate to a specific pixel count?
是否有用于将用于像素的值转换为等于指定像素数的值的计算?
容易食用醋栗派:
deliveryPerformanceWorksheet.Cells.SetColumnWidthPixel(RESTAURANT_LOCATION_COLUMN, 225);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.