This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// 将DataTable数据导入到excel中 | |
| /// </summary> | |
| /// <param name="data">要导入的数据</param> | |
| /// <param name="isColumnWritten">DataTable的列名是否要导入</param> | |
| /// <param name="sheetName">要导入的excel的sheet的名称</param> | |
| /// <returns>导入数据行数(包含列名那一行)</returns> | |
| public int DataTableToExcel(DataTable data, string sheetName, bool isColumnWritten) | |
| { | |
| int i = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// 将excel中的数据导入到DataTable中 | |
| /// </summary> | |
| /// <param name="sheetName">excel工作薄sheet的名称</param> | |
| /// <param name="isFirstRowColumn">第一行是否是DataTable的列名</param> | |
| /// <returns>返回的DataTable</returns> | |
| public DataTable ExcelToDataTable(string sheetName, bool isFirstRowColumn) | |
| { | |
| ISheet sheet = null; | |
| DataTable data = new DataTable(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "errors" | |
| "reflect" | |
| "github.com/boltdb/bolt" |
OlderNewer