回复 1楼kd2011的帖子
你指的是图中红色框中的边框吧?
需要设置 PrintInfo 属性 ShowBorder 为 false:
- private void Form1_Load(object sender, EventArgs e)
- {
- SheetView sv =this.fpSpread1.Sheets[0];
- int rowcount= sv.RowCount = 100;
- int colcount= sv.ColumnCount = 10;
- for (int i = 0; i < rowcount; i++)
- {
- for (int j = 0; j < colcount; j++)
- {
- sv.Cells[i, j].Text = "test";
- }
- }
- PrintInfo p = new PrintInfo();
- p.PrintToPdf = true;
- p.PdfFileName = "spread.pdf";
- p.ShowBorder = false;
- sv.PrintInfo = p;
- this.fpSpread1.PrintSheet(0);
- }
复制代码 |