日期:2014-05-17 浏览次数:20782 次
strQrCodePath = GetQrCode(p.CardCode);
byte[] bytes = System.IO.File.ReadAllBytes(strQrCodePath);
int pictureIdx = workbook.AddPicture(bytes, PictureType.PNG);
// Create the drawing patriarch. This is the top level container for all shapes.
HSSFPatriarch patriarch = (HSSFPatriarch)sheet.CreateDrawingPatriarch();
//add a picture
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 10, 1023, 0, 2, rowsNum, 2, rowsNum);
HSSFPicture pict = (HSSFPicture)patriarch.CreatePicture(anchor, pictureIdx);
pict.Resize();
/// <summary>
/// 生成二维码