excelutil

package module
v0.0.0-...-890e850 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2020 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

excelutil

this is a library to

  • read Excel cell value as string with easy function calling
  • convert Excel cell address (like "D5", "AX20", ...) <-> column number and row number

Dependency

Go version 1.13.x or later is recommended

Usage

-> sample code

License

This software is released under the MIT License, see LICENSE.

Authors

References

https://qiita.com/bamchoh/items/447a4c40e5f39edb2512

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvExcelCellAddressToColnumAndRownum

func ConvExcelCellAddressToColnumAndRownum(excelCellAddress string) (colnum, rownum int)

ex) thisfunc("B:5") -> 2, 5

func ConvExcelColNumToAlphabet

func ConvExcelColNumToAlphabet(cellColnum int) (excelColAlphabet string)

ex) thisfunc(2) -> "B"

Types

type ExcelFile

type ExcelFile struct {
	File     *xlsx.File
	FilePath string
}

func Init

func Init(excelFilePath string) (ret *ExcelFile, err error)

ex) excel := excelutil.ExcelFile{}.Init("./sample.xlsx")

func (*ExcelFile) ReadCell

func (excelFileInstance *ExcelFile) ReadCell(sheetName string, colNum, rowNum int) (string, error)

ex) excel.ReadCell("mysheet1", 3, 3) -> "hoge!"

func (*ExcelFile) ReadCellByCellAddress

func (excelFileInstance *ExcelFile) ReadCellByCellAddress(sheetName string, cellAddress string) (string, error)

ex) excel.ReadCellByCellAddress("mysheet1", "C3") -> "hoge!"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址