可以通过以下代码来实现行高自适应功能:
- private void autoHeightToolStripMenuItem_Click(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.ActiveRow.Height = fpSpread1.ActiveSheet.ActiveRow.GetPreferredHeight();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.Cells[0, 0].Value = "南通呈业订单汇总表";//加文字
- fpSpread1.ActiveSheet.Columns[0].CellType = new FarPoint.Win.Spread.CellType.TextCellType() { Multiline = true, WordWrap = true };
- }
复制代码 |