-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Platform: Windows 10
go version go1.12.4 windows/amd64
node version v8.11.1
Maybe there is some problem with my usage?
code is here:
package main
import (
"fmt"
"time"
"github.com/360EntSecGroup-Skylar/excelize"
)
func main() {
excelPath := "data.xlsx"
timeStart := time.Now().UTC().UnixNano() / 1e6
times := 5
for i :=0 ; i < times; i++ {
f, _ := excelize.OpenFile(excelPath)
_, _ = f.GetRows("main")
}
timeFinished := time.Now().UTC().UnixNano() / 1e6
fmt.Println(timeFinished - timeStart)
}import * as XLSX from 'xlsx';
function run() {
let currentMilliSec = Date.now()
let times = 5
let excelPath = "data.xlsx"
for (let i = 0; i < times; i++) {
var workbook = XLSX.readFile(excelPath);
let sheet = workbook.Sheets["main"];
// let ref: string = sheet['!ref'];
// console.log(ref);
// let xx = ref.split(':')
// console.log(xx[0], xx[1]);
// let start = XLSX.utils.decode_cell(xx[0]);
// console.log(start.c, start.r, XLSX.utils.encode_cell(start));
// let end = XLSX.utils.decode_cell(xx[1]);
// console.log(end.c, end.r, XLSX.utils.encode_cell(end));
// let starRowIdx = 0
// for (let r = 0; r <= end.r; r++) {
// let cellName = XLSX.utils.encode_cell({ c: 0, r: r });
// let cell = sheet[cellName]
// }
}
let after = Date.now()
console.log("js cost: ", after - currentMilliSec, "ms")
}
run()Metadata
Metadata
Assignees
Labels
No labels
