Aspose.Cells.dll 将图片导出Excel 的问题 是不是sheet.Cells.SetRowHeight(i + 1, 195);设置大小 破坏了布局?你设置后每个图片都一样大么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 设置这个大小sheet.Cells.SetRowHeight(i + 1, 195);图片都是一样大小,但图片显示出来有点大,我想再设小一点,这里我试了下,改height,但不管我改大还是改小,图片都乱七八糟了,所以的图片都不是一样大小了 for (int i = 0; i < dt.Rows.Count; i++) { byte[] bytes = CustomerPhotoManager.GetPhoto(Convert.ToDecimal(dt.Rows[i]["PHOTO_ID"])); MemoryStream ms = new MemoryStream(bytes); System.Drawing.Image returnImage = System.Drawing.Image.FromStream(ms); sheet.Cells.SetColumnWidth(n, 30); sheet.Cells.SetRowHeight(m, 160); sheet.Cells[m, n].PutValue(""); sheet.Cells[m + 7, n].PutValue(""); sheet.Pictures.Add(m, n, ms, 50, 50); sheet.Cells[m + 1, n].PutValue("终端编号:" + dt.Rows[i]["CustomerCode"].ToString()); sheet.Cells[m + 2, n].PutValue("终端名称:" + dt.Rows[i]["CUSTOMER_NAME"].ToString()); sheet.Cells[m + 3, n].PutValue("照片类型:" + dt.Rows[i]["PHOTO_TYPE"].ToString()); sheet.Cells[m + 4, n].PutValue("销售代表名称:" + dt.Rows[i]["USER_NAME"].ToString()); sheet.Cells[m + 5, n].PutValue("拍摄时间:" + dt.Rows[i]["photo_date"].ToString()); sheet.Cells[m + 6, n].PutValue("备注:" + dt.Rows[i]["PHOTO_MEMO"].ToString()); //sheet.Cells[m + 7, n].PutValue(""); if ((n + 1) % 3 == 0) n = 0; else n++; if ((i + 1) % 3 == 0) { m = m + 8; } } CustomerPhotoManager 未定义啊 怎么回事,这个CustomerPhotoManager是什么东西,我得怎么用 sheet.Pictures.Add(m, n, ms, 50, 50); m, n ,是指行和列吗?把行和列的高度和宽度设为50,50 ? 文章浏览次数怎么设计好? 导出excel速度优化 asp.net下,显示设备(如服务器,路由器)或是用户是否在线的问题 100分大家进来谈架构 雪地裸求:connection属性尚未初始化的问题,在线等!! ASP.NET程序,在服务器上建立临时目录,为何必须给EVERYONE写权限才行,而来宾帐户不行? 一个排版样式的问题,有点难度 添加水晶报表的问题 如果要显示一表中数据,并可以删除,编辑。但表中有一个字段是很长的字符串(一篇小文章),用什么数据显示组件比较好? 在线急求,关于在asp.net中添加VC的动态连接库 这样的查询 jquery问题,new date()方法
for (int i = 0; i < dt.Rows.Count; i++)
{
byte[] bytes = CustomerPhotoManager.GetPhoto(Convert.ToDecimal(dt.Rows[i]["PHOTO_ID"]));
MemoryStream ms = new MemoryStream(bytes);
System.Drawing.Image returnImage = System.Drawing.Image.FromStream(ms);
sheet.Cells.SetColumnWidth(n, 30);
sheet.Cells.SetRowHeight(m, 160); sheet.Cells[m, n].PutValue("");
sheet.Cells[m + 7, n].PutValue("");
sheet.Pictures.Add(m, n, ms, 50, 50);
sheet.Cells[m + 1, n].PutValue("终端编号:" + dt.Rows[i]["CustomerCode"].ToString());
sheet.Cells[m + 2, n].PutValue("终端名称:" + dt.Rows[i]["CUSTOMER_NAME"].ToString());
sheet.Cells[m + 3, n].PutValue("照片类型:" + dt.Rows[i]["PHOTO_TYPE"].ToString());
sheet.Cells[m + 4, n].PutValue("销售代表名称:" + dt.Rows[i]["USER_NAME"].ToString());
sheet.Cells[m + 5, n].PutValue("拍摄时间:" + dt.Rows[i]["photo_date"].ToString());
sheet.Cells[m + 6, n].PutValue("备注:" + dt.Rows[i]["PHOTO_MEMO"].ToString());
//sheet.Cells[m + 7, n].PutValue("");
if ((n + 1) % 3 == 0)
n = 0;
else
n++; if ((i + 1) % 3 == 0)
{
m = m + 8;
} }
m, n ,是指行和列吗?
把行和列的高度和宽度设为50,50 ?