aspose.cells示例及文档

网上找了很多,大都是小例子,价值不高。于是去github上搜了下,找到

https://github.com/asposecells/Aspose_Cells_NET

这是官方的示例库,从Readme中,也找到文档地址。 

http://www.aspose.com/docs/display/cellsnet/Home

示例和文档基本是对应关系。文档的函数或属性与Excel中的设置窗体一般都是对应的,比如:

21214512_cwU8.png

每一个属性都与之对应。真的很全面。

摘录几段代码,是我所必须要用到的:

选中文字,以设置样式:

//Setting the font of selected characters to bold
 cell.Characters(6, 7).Font.IsBold = true;

//Setting the font color of selected characters to blue
 cell.Characters(6, 7).Font.Color = Color.Blue;

显示的换行

//Add Text to the Firts Cell with Explicit Line Breaks
            cell[0, 0].PutValue("I am using\nthe latest version of \nAspose.Cells to \ntest this functionality");

            //Make Cell's Text wrap
            Style style = cell[0, 0].GetStyle();
            style.IsTextWrapped = true;
            cell[0, 0].SetStyle(style);

自动缩放:

style.ShrinkToFit = true;

上下标:

//Setting subscript effect
style.Font.IsSubscript = true;
//Setting superscript effect
style.Font.IsSuperscript = true;

在Files/Handing/OpeningFiles.cs中,有九个打开文件的示例。就不引用了。 

转载于:https://my.oschina.net/u/1540190/blog/607680

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值