Skip to content

Commit

Permalink
feat: add SetPageLayout,GetPageLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtwinkle committed Jun 7, 2024
1 parent 6242bea commit fa6071e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions excelizeam.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type Excelizeam interface {
// Excelize StreamWriter Wrapper

SetPageMargins(options *excelize.PageLayoutMarginsOptions) error
SetPageLayout(options *excelize.PageLayoutOptions) error
GetPageLayout() (excelize.PageLayoutOptions, error)
SetColWidth(colIndex int, width float64) error
SetColWidthRange(colIndexMin, colIndexMax int, width float64) error
MergeCell(startColIndex, startRowIndex, endColIndex, endRowIndex int) error
Expand Down Expand Up @@ -166,6 +168,14 @@ func (e *excelizeam) SetPageMargins(options *excelize.PageLayoutMarginsOptions)
)
}

func (e *excelizeam) SetPageLayout(options *excelize.PageLayoutOptions) error {
return e.file.SetPageLayout(e.sw.Sheet, options)
}

func (e *excelizeam) GetPageLayout() (excelize.PageLayoutOptions, error) {
return e.file.GetPageLayout(e.sw.Sheet)
}

func (e *excelizeam) MergeCell(startColIndex, startRowIndex, endColIndex, endRowIndex int) error {
startCell, err := excelize.CoordinatesToCellName(startColIndex, startRowIndex)
if err != nil {
Expand Down

0 comments on commit fa6071e

Please sign in to comment.