需要导入的jar包 具体实现 public class ColumnToString { public static void main(String[] args) { new ColumnToString().read(); } public void read() { File file = new File("Excel 文件位置(C:\\myExcel.xlsx)"); InputStream inputStream = null; Workbook workbook = n
第一次写C#与sql的东西,主要任务是从Excel读取数据,再存到SQL server中. 先上读取Excel文件的code如下. public bool GetFiles(string equipName) { //choose all sheet? or all data in sheet? string strExcel = "select * from [Sheet1$]"; //初始化system.IO的配置(路径) DirectoryInfo directoryInfo1