导出Excel是所见即所得,要是需要自适应,需要在导出前设置好。
- FarPoint.Win.Spread.Row row;
- FarPoint.Win.Spread.Column col;
- float sizerow;
- float sizecol;
- 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;
复制代码
|