michael 你好:
请参考代码进行设置:
后台- FarPoint.Web.Spread.ImageCellType imagecell = new FarPoint.Web.Spread.ImageCellType();
- imagecell.ImageUrl = @"images\Tulips.jpg";
- //设置文字在图片上
- imagecell.TextOnRight = false;
- //设置图片自动适应单元格大小
- imagecell.CssClass = "test";
- FpSpread1.ActiveSheetView.Cells[1, 1].Text = "imagecell";
- FpSpread1.ActiveSheetView.Cells[1, 1].CellType = imagecell;
复制代码 CSS 样式:- <style type="text/css">
- .test img
- {
- width:100%;
- height:100%;
- }
- </style>
复制代码 |