回复 1楼youitlyang的帖子
通过ImageCellType就可以在单元格中显示图片:
- FarPoint.Win.Spread.CellType.ImageCellType imgct = new FarPoint.Win.Spread.CellType.ImageCellType();
- System.Drawing.Image image = System.Drawing.Image.FromFile("D:\\Logos\\logo.jpg");
- imgct.Style = FarPoint.Win.RenderStyle.Stretch;
- imgct.TransparencyColor = Color.Black;
- imgct.TransparencyTolerance = 20;
- fpSpread1.Sheets[0].Cells[1,1,1,2].BackColor = Color.Magenta;
- fpSpread1.Sheets[0].Columns[1,2].Width = 100;
- fpSpread1.Sheets[0].Rows[1,1].Height = 50;
- fpSpread1.Sheets[0].Cells[1,1,2,2].CellType = imgct;
- fpSpread1.Sheets[0].Cells[1,1].Value = image;
复制代码 |