module
Version:
v0.0.0-...-a41b112
Opens a new window with list of versions in this module.
Published: Aug 1, 2017
License: MIT
Opens a new window with license information.
README
¶
xls2csv-go
Package xls2csv is a Golang package which converts XLS file to CSV records. It's based on libxls and xls2csv.
Install xls2csv
package
Usage
package main
import (
"fmt"
"github.com/northbright/xls2csv-go/xls2csv"
)
func main() {
var err error
f := "/home/xx/my.xls"
sheetId := 0
records := [][]string{}
// Call XLS2CSV() to convert XLS and get all records.
if records, err = xls2csv.XLS2CSV(f, sheetId); err != nil {
fmt.Printf("err: %v\n", err)
return
}
fmt.Printf("records: %v\n", records)
}
Build and Test Your App
-
Do not forget to add CGO_CFLAGS=-I/usr/local/libxls/include CGO_LDFLAGS="-L/usr/local/libxls/lib -l xlsreader"
before go build
or go test
CGO_CFLAGS=-I/usr/local/libxls/include CGO_LDFLAGS="-L/usr/local/libxls/lib -l xlsreader" go build
Documentation
License
Directories
¶
Package xls2csv is a Golang package which converts XLS file to CSV records.
|
Package xls2csv is a Golang package which converts XLS file to CSV records. |
Click to show internal directories.
Click to hide internal directories.