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

浙公网安备 33010602011771号