资源简介
npoi 2.0,内含.net framework 2.0、3.5、4.0各版本npoi,也包含example,从官网上下的。

代码片段和文件信息
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License Version 2.0
(the “License“); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing software
distributed under the License is distributed on an “AS IS“ BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
using System;
using System.Text;
using System.IO;
using NPOI.HSSF.UserModel;
using NPOI.HPSF;
using NPOI.POIFS.FileSystem;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
/* This sample is copied from poi/hssf/usermodel/examples/Hyperlink.java */
namespace AddHyperlinkInXls
{
class Program
{
static void Main(string[] args)
{
InitializeWorkbook();
////cell style for hyperlinks
////by default hyperlinks are blue and underlined
ICellstyle hlink_style = hssfworkbook.CreateCellstyle();
IFont hlink_font = hssfworkbook.CreateFont();
hlink_font.Underline = (byte)FontUnderlineType.SINGLE;
hlink_font.Color = HSSFColor.BLUE.index;
hlink_style.SetFont(hlink_font);
ICell cell;
ISheet sheet = hssfworkbook.CreateSheet(“Hyperlinks“);
//URL
cell = sheet.CreateRow(0).CreateCell(0);
cell.SetCellValue(“URL link“);
HSSFHyperlink link = new HSSFHyperlink(HyperlinkType.URL);
link.Address = (“http://poi.apache.org/“);
cell.Hyperlink = (link);
cell.Cellstyle = (hlink_style);
//link to a file in the current directory
cell = sheet.CreateRow(1).CreateCell(0);
cell.SetCellValue(“File link“);
link = new HSSFHyperlink(HyperlinkType.FILE);
link.Address = (“link1.xls“);
cell.Hyperlink = (link);
cell.Cellstyle = (hlink_style);
//e-mail link
cell = sheet.CreateRow(2).CreateCell(0);
cell.SetCellValue(“Email link“);
link = new HSSFHyperlink(HyperlinkType.EMAIL);
//note if subject contains white spaces make sure they are url-encoded
link.Address = (“mailto:poi@apache.org?subject=Hyperlinks“);
cell.Hyperlink = (link);
cell.Cellstyle = (hlink_style);
//link to a place in this
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-03-06 07:20 npoi\
目录 0 2013-03-07 10:24 npoi\dotnet2\
文件 200704 2013-03-06 07:13 npoi\dotnet2\ICSharpCode.SharpZipLib.dll
文件 1624064 2013-03-06 07:17 npoi\dotnet2\NPOI.dll
文件 387072 2013-03-06 07:17 npoi\dotnet2\NPOI.OOxm
文件 79872 2013-03-06 07:17 npoi\dotnet2\NPOI.Openxm
文件 120 2013-03-06 07:13 npoi\dotnet2\NPOI.Openxm
文件 1316864 2013-03-06 07:17 npoi\dotnet2\NPOI.Openxm
文件 2144246 2013-03-06 07:17 npoi\dotnet2\NPOI.xm
目录 0 2013-03-07 10:24 npoi\dotnet3.5\
文件 200704 2013-03-06 07:13 npoi\dotnet3.5\ICSharpCode.SharpZipLib.dll
文件 1624064 2013-03-06 07:17 npoi\dotnet3.5\NPOI.dll
文件 387072 2013-03-06 07:17 npoi\dotnet3.5\NPOI.OOxm
文件 79872 2013-03-06 07:17 npoi\dotnet3.5\NPOI.Openxm
文件 120 2013-03-06 07:13 npoi\dotnet3.5\NPOI.Openxm
文件 1316864 2013-03-06 07:17 npoi\dotnet3.5\NPOI.Openxm
文件 2144246 2013-03-06 07:17 npoi\dotnet3.5\NPOI.xm
目录 0 2013-03-07 10:24 npoi\dotnet4\
文件 200704 2013-03-06 07:13 npoi\dotnet4\ICSharpCode.SharpZipLib.dll
文件 1624064 2013-03-06 07:17 npoi\dotnet4\NPOI.dll
文件 387072 2013-03-06 07:17 npoi\dotnet4\NPOI.OOxm
文件 79872 2013-03-06 07:17 npoi\dotnet4\NPOI.Openxm
文件 1316864 2013-03-06 07:17 npoi\dotnet4\NPOI.Openxm
文件 2145032 2013-03-06 07:13 npoi\dotnet4\NPOI.xm
目录 0 2013-03-05 08:33 npoi\examples\
目录 0 2013-03-05 08:33 npoi\examples\hssf\
目录 0 2013-03-05 08:33 npoi\examples\hssf\AddHyperli
文件 4432 2013-03-05 08:10 npoi\examples\hssf\AddHyperli
文件 257 2013-03-05 08:10 npoi\examples\hssf\AddHyperli
文件 4498 2013-03-05 08:10 npoi\examples\hssf\AddHyperli
目录 0 2013-03-05 08:33 npoi\examples\hssf\AddHyperli
............此处省略471个文件信息
相关资源
- Microsoft Forms 2.0107770
- 西门坡论坛pb框架 普通版 2.0 非常漂
- 联想扬天电脑用户手册
- WPF USB 网络 串口 通信软件
- B/S 网上订餐系统
- 教室管理系统.rar
- 小鸡快跑游戏.
-
分别适用于.NET fr
amework 2.0和4.0的E - 汽车租赁系统............................
- 德卡D8读写器关于读写感应卡的一些代
- 报文模拟仿真测试工具2.0
- halcon 测量助手
- 图片存储到数据库保存二进制文件并
- OPC插件OPC Core Components 2.00 SDK 2.20
- 用Socket写的简易FTP服务器和客户端
- 企业销售管理信息系统(全套)
- 串口操作类(justinio)
- 基于Petri网的工作流(完整的原创源代
- 基于J2EE物资出入库管理系统
- 选择题自动考试系统
- 多线程实例:桌面智能弹球小游戏
- txt测井曲线转换las2.0(新编)
- 收藏奉献_DOS汉字系统03:WPS 2.0 + 金山
- 详细图解联想Y430\\Y530笔记本SLIC表2.
- SentinelRMSToolkitv2.0.rar
- powerpaste-4.0.1-317(兼容最新tinymce5.2.
- xlrd-1.2.0完整包
- USB网卡驱动 USB2.0 TO Fast Ethernet Adapte
- st foc 2.0 中文手册
- PRS+ 2.0.17 中文版 for SONY PRS 300
评论
共有 条评论