Skip to content
Golang bindings for libxlsxwriter for writing XLSX files
Go Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Added support for writing formulas along with two usage examples (#4) Mar 23, 2017
resources Added WriteUrl(), WriteBool(), and WriteBlank() (#6) Apr 2, 2017
.gitignore Rename project to from xlsxwriter to goxlsxwriter (#3) Mar 22, 2017
.travis.yml Updated to build on Go 1.10.x Apr 20, 2018
LICENSE Rename project to from xlsxwriter to goxlsxwriter (#3) Mar 22, 2017
README.md Update README.md Jul 9, 2017
format.go
format_test.go
workbook.go Rename project to from xlsxwriter to goxlsxwriter (#3) Mar 22, 2017
workbook_test.go Rename project to from xlsxwriter to goxlsxwriter (#3) Mar 22, 2017
worksheet.go Added WriteUrl(), WriteBool(), and WriteBlank() (#6) Apr 2, 2017
worksheet_test.go

README.md

goxlsxwriter

Build Status Go Report Card Coverage Status

goxlsxwriter provides Go bindings for the libxlsxwriter C library.

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 for more information on installing libxlsxwriter.

Sample Use

package main

import (
    "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
You can’t perform that action at this time.