Documentation ¶
Index ¶
- func ColNumPosition(col string) int
- func ColStringPosition(num int) string
- func IsExistString(strs []string, str string) bool
- func NewExcl()
- type Border
- type BorderSetting
- type Cell
- func (cell *Cell) GetStyle() *Style
- func (cell *Cell) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (cell *Cell) SetBackgroundColor(color string) *Cell
- func (cell *Cell) SetBorder(border Border) *Cell
- func (cell *Cell) SetDate(val time.Time) *Cell
- func (cell *Cell) SetFont(font Font) *Cell
- func (cell *Cell) SetFormula(val string) *Cell
- func (cell *Cell) SetNumFmt(fmt string) *Cell
- func (cell *Cell) SetNumber(val interface{}) *Cell
- func (cell *Cell) SetString(val string) *Cell
- func (cell *Cell) SetStyle(style *Style) *Cell
- type ContentTypes
- type ContentTypesXML
- type Font
- type Relationships
- type Row
- func (row *Row) CreateCells(from int, to int) []*Cell
- func (row *Row) GetCell(colNo int) *Cell
- func (row *Row) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (row *Row) SetDate(val time.Time, colNo int) *Cell
- func (row *Row) SetFormula(val string, colNo int) *Cell
- func (row *Row) SetHeight(height float64)
- func (row *Row) SetNumber(val interface{}, colNo int) *Cell
- func (row *Row) SetString(val string, colNo int) *Cell
- type SharedStrings
- type Sheet
- func (sheet *Sheet) Close() error
- func (sheet *Sheet) Create(dir string) error
- func (sheet *Sheet) CreateRows(from int, to int) []*Row
- func (sheet *Sheet) GetRow(rowNo int) *Row
- func (sheet *Sheet) Open(dir string) error
- func (sheet *Sheet) OutputAll()
- func (sheet *Sheet) OutputThroughRowNo(rowNo int)
- func (sheet *Sheet) SetColWidth(width float64, colNo int)
- func (sheet *Sheet) ShowGridlines(show bool)
- type SheetXML
- type Style
- type Styles
- func (styles *Styles) Close() error
- func (styles *Styles) GetStyle(index int) *Style
- func (styles *Styles) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (styles *Styles) SetBackgroundColor(color string) int
- func (styles *Styles) SetBorder(border Border) int
- func (styles *Styles) SetCellXfs(style *Style) int
- func (styles *Styles) SetFont(font Font) int
- func (styles *Styles) SetNumFmt(format string) int
- func (styles *Styles) SetStyle(style *Style) int
- type Tag
- type Workbook
- func (workbook *Workbook) Close() error
- func (workbook *Workbook) HideSheet(name string)
- func (workbook *Workbook) OpenSheet(name string) (*Sheet, error)
- func (workbook *Workbook) RenameSheet(old string, new string)
- func (workbook *Workbook) Save(path string) error
- func (workbook *Workbook) SetForceFormulaRecalculation(flg bool)
- func (workbook *Workbook) ShowSheet(name string)
- type WorkbookRels
- type WorkbookXML
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColNumPosition ¶
ColNumPosition obtain column no from AtoZ column string
func ColStringPosition ¶
ColStringPosition obtain AtoZ column string from column no
func IsExistString ¶
IsExistString 配列内に文字列が存在するかを確認する
Types ¶
type Border ¶
type Border struct { Left *BorderSetting Right *BorderSetting Top *BorderSetting Bottom *BorderSetting }
Border 罫線の設定
type Cell ¶
type Cell struct { R string // contains filtered or unexported fields }
Cell はセル一つ一つに対する構造体
func NewCell ¶
func NewCell(tag *Tag, sharedStrings *SharedStrings, styles *Styles) *Cell
NewCell は新しくcellを作成する
func (*Cell) MarshalXML ¶
MarshalXML create xml for cell
func (*Cell) SetBackgroundColor ¶
SetBackgroundColor 背景色をセットする
func (*Cell) SetFormula ¶
SetFormula set a formula in a cell
type ContentTypes ¶
type ContentTypes struct {
// contains filtered or unexported fields
}
ContentTypes ContentTypesの情報を保持
func OpenContentTypes ¶
func OpenContentTypes(dir string) (*ContentTypes, error)
OpenContentTypes [Content_Types].xmlファイルを開き構造体に読み込む
func (*ContentTypes) Close ¶
func (types *ContentTypes) Close() error
Close [Content_Types].xmlファイルを閉じる
type ContentTypesXML ¶
type ContentTypesXML struct { XMLName xml.Name `xml:"Types"` Xmlns string `xml:"xmlns,attr"` Defaults []contentDefault `xml:"Default"` Overrides []contentOverride `xml:"Override"` }
ContentTypesXML [Content_Types].xmlファイルを読み込む
type Relationships ¶
type Relationships struct { XMLName xml.Name `xml:"Relationships"` Xmlns string `xml:"xmlns,attr"` Rels []relationship `xml:"Relationship"` }
Relationships Relationshipsタグの情報
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row 行の構造体
func NewRow ¶
func NewRow(tag *Tag, sharedStrings *SharedStrings, styles *Styles) *Row
NewRow は新しく行を追加する際に使用する
func (*Row) CreateCells ¶
CreateCells セル一覧を用意する
func (*Row) MarshalXML ¶
MarshalXML Create xml tags
func (*Row) SetFormula ¶
SetFormula set a formula at a row
type SharedStrings ¶
type SharedStrings struct {
// contains filtered or unexported fields
}
SharedStrings 構造体
func OpenSharedStrings ¶
func OpenSharedStrings(dir string) (*SharedStrings, error)
OpenSharedStrings 新しいSharedString構造体を作成する
func (*SharedStrings) AddString ¶
func (ss *SharedStrings) AddString(text string) int
AddString 文字列データを追加する 戻り値はインデックス情報(0スタート)
type Sheet ¶
Sheet struct for control sheet data
func (*Sheet) CreateRows ¶
CreateRows create multiple rows
func (*Sheet) OutputThroughRowNo ¶
OutputThroughRowNo output through to rowno
func (*Sheet) SetColWidth ¶
SetColWidth set column width
func (*Sheet) ShowGridlines ¶
ShowGridlines switch show/hide grid lines
type SheetXML ¶
type SheetXML struct { XMLName xml.Name `xml:"sheet"` Name string `xml:"name,attr"` SheetID string `xml:"sheetId,attr"` RID string `xml:"id,attr"` }
SheetXML sheet.xml information
type Style ¶
type Style struct { NumFmtID int FontID int FillID int BorderID int XfID int Horizontal string Vertical string Wrap int // contains filtered or unexported fields }
Style セルの書式情報
type Styles ¶
type Styles struct {
// contains filtered or unexported fields
}
Styles スタイルの情報を持った構造体
func (*Styles) MarshalXML ¶
MarshalXML stylesからXMLを作り直す
func (*Styles) SetBackgroundColor ¶
SetBackgroundColor 背景色を追加する
func (*Styles) SetCellXfs ¶
SetCellXfs cellXfsにタグを追加する
type Tag ¶
Tag タグの情報をすべて保管する
func (*Tag) MarshalXML ¶
MarshalXML タグからXMLを作成しなおす
func (*Tag) UnmarshalXML ¶
UnmarshalXML タグにXMLを読み込む
type Workbook ¶
Workbook はワークブック内の情報を格納する
func (*Workbook) OpenSheet ¶
OpenSheet Open specified sheet if there is no specified sheet then create new sheet
func (*Workbook) RenameSheet ¶
RenameSheet rename sheet name from old name to new name.
func (*Workbook) SetForceFormulaRecalculation ¶
SetForceFormulaRecalculation set fullCalcOnLoad attribute to calcPr tag. When this excel file is opened, all calculation fomula will be recalculated.
type WorkbookRels ¶
type WorkbookRels struct {
// contains filtered or unexported fields
}
WorkbookRels workbook.xml.relの情報をもつ構造体
func OpenWorkbookRels ¶
func OpenWorkbookRels(dir string) (*WorkbookRels, error)
OpenWorkbookRels open workbook.xml.rels
type WorkbookXML ¶
WorkbookXML workbook.xmlに記載されている<workbook>タグの中身