Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fterrag/Goxlsxwriter
Golang bindings for libxlsxwriter for writing XLSX files
https://github.com/fterrag/Goxlsxwriter
excel excelwriter golang golang-bindings golang-library libxlsxwriter xlsx
Last synced: 20 days ago
JSON representation
Golang bindings for libxlsxwriter for writing XLSX files
- Host: GitHub
- URL: https://github.com/fterrag/Goxlsxwriter
- Owner: fterrag
- License: other
- Archived: true
- Created: 2017-03-13T04:15:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-10T07:38:30.000Z (over 2 years ago)
- Last Synced: 2024-07-31T01:29:38.715Z (4 months ago)
- Topics: excel, excelwriter, golang, golang-bindings, golang-library, libxlsxwriter, xlsx
- Language: Go
- Homepage:
- Size: 90.8 KB
- Stars: 21
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
goxlsxwriter
============[![Build Status](https://travis-ci.org/fterrag/goxlsxwriter.svg?branch=master)](https://travis-ci.org/fterrag/goxlsxwriter) [![Go Report Card](https://goreportcard.com/badge/github.com/fterrag/goxlsxwriter)](https://goreportcard.com/report/github.com/fterrag/goxlsxwriter) [![Coverage Status](https://coveralls.io/repos/github/fterrag/goxlsxwriter/badge.svg)](https://coveralls.io/github/fterrag/goxlsxwriter)
goxlsxwriter provides Go bindings for the [libxlsxwriter](https://github.com/jmcnamara/libxlsxwriter) C library.
![](https://cloud.githubusercontent.com/assets/22901700/23842694/75b0b3c2-078c-11e7-8ef6-5ae9489971b6.png)
## Install
goxlsxwriter requires the libxslxwriter library to be installed. To build from source via Git:
```
$ git clone https://github.com/jmcnamara/libxlsxwriter.git
$ cd libxlsxwriter
$ make
$ make install
```Visit [http://libxlsxwriter.github.io/getting_started.html](http://libxlsxwriter.github.io/getting_started.html) for more information on installing libxlsxwriter.
## Sample Use
```go
package mainimport (
"github.com/fterrag/goxlsxwriter"
)func main() {
workbook := goxlsxwriter.NewWorkbook("example.xlsx", nil)
worksheet := goxlsxwriter.NewWorksheet(workbook, "Sheet 1")format := goxlsxwriter.NewFormat(workbook)
format.SetFontName("Verdana")
format.SetFontSize(8)
format.SetFontColor(0x008000)worksheet.WriteString(0, 0, "Hello from A1!", format)
worksheet.WriteString(4, 1, "This cell is B5", nil)options := &goxlsxwriter.ImageOptions{
XScale: 0.5,
YScale: 0.5,
}
worksheet.InsertImage(1, 3, "resources/gopher.png", options)workbook.Close()
}
```## Todo
- [ ] Increase test coverage
- [ ] Documentation
- [ ] Expand libxlsxwriter API coverage## Contributing
* Submit a PR (tests and documentation included)
* Add or improve documentation
* Report issues
* Suggest new features or enhancements