package
module
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Mar 15, 2024
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
go语言版的excel2json
go语言的高性能,而且支持跨平台
go语言版本的excel2json,可以把excel表转换成json文件
使用方法:
在命令行中使用,输入
cxcel2json -help
运行结果,可查询运行参数
-e string
Required. 输入的Excel文件路径
-h int
表格中有几行是表头. (default 3)
-j string
指定输出的json文件路径
-k int
key值在第几行 (default 1)
-s string
excel表的页签名称 (default "data")
如果需要转一个excel表比如 item.xlxs 表
excel2json -e item.xlxs -j item.json
Documentation
¶
Excel 将Excel文件转换为JSON格式
@Description: 此函数用于读取指定的Excel文件,根据提供的表头位置、关键行索引和工作表名称,将数据转换为JSON格式,并保存到指定的目录下。
@param file string - Excel文件的路径。
@param jsonDir string - 生成的JSON文件将保存在该目录下。如果未指定,将与Excel文件同名但扩展名为.json。
@param header int - 表头所在的行索引(从0开始)。
@param key int - 包含列名的关键行索引(从0开始)。
@param sheet string - Excel工作表的名称。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.