rdcjf 你好,
1.关于前三个问题,可以设置 Sheet 的 PrintInfo 去定制导出 Excel 文件的打印设置。
2.关于问题四,可以设置 Sheet 的 Protect 属性,参考代码:
- for (int i = 0; i < 10; i++)
- {
- for (int j = 0; j < 10; j++)
- {
- fpSpread1_Sheet1.Cells[i, j].Text = (i + j).ToString();
- }
- }
- FarPoint.Win.Spread.PrintInfo test = new FarPoint.Win.Spread.PrintInfo();
- test.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide;
- test.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
- test.ShowColor = false;
- fpSpread1.ActiveSheet.PrintInfo = test;
- fpSpread1_Sheet1.Protect = false;
复制代码 |