Word Excel读写操作相关

总结一下自己写的 工具类之一

 

1 jar包位置

 E:\F\UtilJars\ExcelWrite_fat.jar

http://www.cnblogs.com/cici-new/admin/Files.aspx/ExcelWrite_fat.jar

2 使用

 先编辑excel 文件 写入信息

在运行如下命令

C:\Users\Administrator.cici-THINK>java -jar E:\F\UtilJars\ExcelWrite_fat.jar
Please insert the Source File :
F:\\AIT\\Lottes\\DB\\初始化数据库语句\\TABLE NAMES.xlsx
Please insert the pageNO :
3
Please insert the lineNO :
104
Please insert the listNo1 :
0
Please insert the listNo2 :
1

 

4 主函数说明

/**
     * ReadData from Excel txt form
     * @Functuou: 读取指定位置的excel文件 然后读取指定sheet 指定列指定行的信息 输出到屏幕
     * @param sourcefile the source file path
     * @param sheetPageNo the sheet no of target content
     * @param lineNo the line no of target content
     * @param listNo the list no of target content
     * @return
     */
    
    public static List<String> readExcel(String sourcefile,int pageNo,int lineNo,int listNo1,int listNo2)  

==============================================================================
备注:需要制定jar package的mainclass
指定JAR package mainclass的
文件位置
ExcelWrite_fat.jar\META-INF\MANIFEST.MF
文件内容
Manifest-Version: 1.0
Created-By: Fat Jar Eclipse Plug-In
Main-Class: com.cici.testExcel.ReadExcel
Class-Path: E:\F\UtilJars

posted @ 2013-01-19 16:46  王超_cc  阅读(172)  评论(0编辑  收藏  举报