版主你好:
我采用如下作为单元格样式设置,展示结果和导出的excel结果不一致,希望能够下载下来也是一样的。
//设置单元格数字
private TagCloudCellType CreateTagClouCellType(string Name, string strDate)
{
TagCloudCellType tagCloudCellType = new TagCloudCellType();
tagCloudCellType.TagCloudItems.Add(CreateTagCloudItem(Name, 39));
tagCloudCellType.TagCloudItems.Add(CreateTagCloudItem("日期:" + strDate, 22));
tagCloudCellType.RankingColors = new string[] { "black" };
tagCloudCellType.RankingFonts = new string[] { "Arial" };
return tagCloudCellType;
}
private TagCloudItem CreateTagCloudItem(string name, int weight)
{
return new TagCloudItem(name, weight);
//设置不同字体大小的超链接
// return new TagCloudItem(name, weight, "http://msdn.microsoft.com/en-us/library/Tags-Cloud.aspx?tag=" + name, weight.ToString() + " item(s) tagged");
}
界面展示效果:
QQ图片20140929165546.jpg
(20.53 KB, 下载次数: 128)
|
|