read_excel

command module
v0.0.0-...-0cf9e5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2020 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

php项目需要读取上传的xls/xlsx文件入库,所以开发了这个脚本

$cmd = "./read_excel  --file=xxx.xls";
$xlsx = `$cmd`;
if (strstr($xlsx, 'not a valid zip file') || strstr($xlsx, 'not an excel file')) {
    return ['error' => '请另存为xlsx或xls文件再上传'];
}
$xlsx = json_decode(str_replace('result =  ', '', $xlsx), 1);

mac上打包linux运行文件
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o read_excel main.go

Documentation

Overview

* 读取excel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址