All Projects → aswjh → Excel

aswjh / Excel

Licence: bsd-2-clause
read and write excel files in go/golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Excel

Openvasreporting
OpenVAS Reporting: Convert OpenVAS XML report files to reports
Stars: ✭ 42 (-44%)
Mutual labels:  excel
Ngx Excel Export
Angular6 application with export data to excel file functionality.
Stars: ✭ 58 (-22.67%)
Mutual labels:  excel
Excelize
Golang library for reading and writing Microsoft Excel™ (XLSX) files.
Stars: ✭ 10,286 (+13614.67%)
Mutual labels:  excel
Excel2json
把Excel表转换成json对象,并保存到一个文本文件中。
Stars: ✭ 1,023 (+1264%)
Mutual labels:  excel
Zerocell
Simple, efficient Excel to POJO library for Java
Stars: ✭ 53 (-29.33%)
Mutual labels:  excel
Superfileview
基于腾讯浏览服务Tbs,使用X5Webkit内核,实现文件的展示功能,支持多种文件格式
Stars: ✭ 1,115 (+1386.67%)
Mutual labels:  excel
Pyexcel Io
One interface to read and write the data in various excel formats, import the data into and export the data from databases
Stars: ✭ 40 (-46.67%)
Mutual labels:  excel
Fast Excel
🦉 Fast Excel import/export for Laravel
Stars: ✭ 1,183 (+1477.33%)
Mutual labels:  excel
Excelreaders.jl
ExcelReaders is a package that provides functionality to read Excel files.
Stars: ✭ 55 (-26.67%)
Mutual labels:  excel
Expss
expss: Tables and Labels in R
Stars: ✭ 65 (-13.33%)
Mutual labels:  excel
Django Rest Pandas
📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)
Stars: ✭ 1,030 (+1273.33%)
Mutual labels:  excel
Tablereport
A python library for making table report.
Stars: ✭ 51 (-32%)
Mutual labels:  excel
Firetable
Excel/Google Sheets like UI for Firebase/Firestore. No more admin portals!
Stars: ✭ 1,115 (+1386.67%)
Mutual labels:  excel
Excellentexport
Javascript export to Excel
Stars: ✭ 1,018 (+1257.33%)
Mutual labels:  excel
Npoi.extension
This repo contains the extension for the NPOI, which provides IEnumerable<T> have save to and load from excel functionalities.
Stars: ✭ 67 (-10.67%)
Mutual labels:  excel
Desktopeditors
An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
Stars: ✭ 1,008 (+1244%)
Mutual labels:  excel
Documentbuilder
ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
Stars: ✭ 61 (-18.67%)
Mutual labels:  excel
Myexcel
MyExcel, a new way to operate excel!
Stars: ✭ 1,198 (+1497.33%)
Mutual labels:  excel
Magento2 Import Export Sample Files
Default Magento 2 CE import / export CSV files & sample files for Firebear Improved Import / Export extension
Stars: ✭ 68 (-9.33%)
Mutual labels:  excel
Autowrap
Wrap existing D code for use in Python, Excel, C#
Stars: ✭ 64 (-14.67%)
Mutual labels:  excel

excel for golang

read and write excel files in golang.

go语言读写excel文件.

dependency

github.com/go-ole/go-ole

install

go get github.com/aswjh/excel

example

package main

import (
	"runtime"
	"fmt"
	"time"
	"github.com/aswjh/excel"
)

func main() {
	runtime.GOMAXPROCS(1)
	option := excel.Option{"Visible": true, "DisplayAlerts": true, "ScreenUpdating": true}
	xl, _ := excel.New(option)      //xl, _ := excel.Open("test_excel.xls", option)
	defer xl.Quit()

	sheet, _ := xl.Sheet(1)         //xl.Sheet("sheet1")
	defer sheet.Release()
	sheet.Cells(1, 1, "hello")
	sheet.PutCell(1, 2, 2006)
	sheet.MustCells(1, 3, 3.14159)

	cell := sheet.Cell(5, 6)
	defer cell.Release()
	cell.Put("go")
	cell.Put("font", map[string]interface{}{"name": "Arial", "size": 26, "bold": true})
	cell.Put("interior", "colorindex", 6)

	sheet.PutRange("a3:c3", []string {"@1", "@2", "@3"})
	rg := sheet.Range("d3:f3")
	defer rg.Release()
	rg.Put([]string {"~4", "~5", "~6"})

	urc := sheet.MustGet("UsedRange", "Rows", "Count").(int32)
	println("str:"+sheet.MustCells(1, 2), sheet.MustGetCell(1, 2).(float64), cell.MustGet().(string), urc)

	cnt := 0
	sheet.ReadRow("A", 1, "F", 9, func(row []interface{}) (rc int) {    //"A", 1 or 1, 9 or 1 or nothing
		cnt ++
		fmt.Println(cnt, row)
		return                                                                   //-1: break
	})

	time.Sleep(2000000000)

	//Sort
	cells := excel.GetIDispatch(sheet, "Cells")
	cells.CallMethod("UnMerge")
	sort := excel.GetIDispatch(sheet, "Sort")
	sortfields := excel.GetIDispatch(sort, "SortFields")
	sortfields.CallMethod("Clear")
	sortfields.CallMethod("Add", sheet.Range("f:f").IDispatch, 0, 2)
	sort.CallMethod("SetRange", cells)
	sort.PutProperty("Header", 1)
	sort.CallMethod("Apply")

	//Chart
	shapes := excel.GetIDispatch(sheet, "Shapes")
	_chart, _ := shapes.CallMethod("AddChart", 65)
	chart := _chart.ToIDispatch()
	chart.CallMethod("SetSourceData", sheet.Range("a1:c3").IDispatch)

	//AutoFilter
	cells.CallMethod("AutoFilter")
	excel.Release(sortfields, sort, cells, chart, shapes)

	time.Sleep(3000000000)
	xl.SaveAs("test_excel.xls")    //xl.SaveAs("test_excel", "html")
}

license

The BSD 3-Clause license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].