可以根据文字内容获取一个合适的行高列宽,然后设置。
如果内容都一样的话,批量设置下
FarPoint.Win.Spread.Row row;
FarPoint.Win.Spread.Column col;
float sizerow;
float sizercol;
row = fpSpread1.ActiveSheet.Rows[0];
col = fpSpread1.ActiveSheet.Columns[0];
fpSpread1.ActiveSheet.Cells[0, 0].Text = "This text is used to determine the height and width.";
sizerow = row.GetPreferredHeight();
sizecol = col.GetPreferredWidth();
row.Height = sizerow;
col.Width = sizecol;
|