Skip to content

Commit

Permalink
Update en version docs for the new AddHeaderFooterImage function
Browse files Browse the repository at this point in the history
- Add new exported HeaderFooterImagePositionType enumeration
- Add new fields PageOrder for PageLayoutOptions
  • Loading branch information
xuri committed Nov 19, 2024
1 parent d1aef4d commit d570f99
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* [Set workbook properties](workbook.md#SetWorkbookProps)
* [Get workbook properties](workbook.md#GetWorkbookProps)
* [Set header and footer](workbook.md#SetHeaderFooter)
* [Add header and footer image](workbook.md#AddHeaderFooterImage)
* [Set defined name](workbook.md#SetDefinedName)
* [Get defined name](workbook.md#GetDefinedName)
* [Delete defined name](workbook.md#DeleteDefinedName)
Expand Down
28 changes: 27 additions & 1 deletion en/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ type Options struct {

`CultureInfo` specifies the country code for applying built-in language number format code these effect by the system's local language settings.

`HeaderFooterImagePositionType` is the type of header and footer image position.

```go
type HeaderFooterImagePositionType byte
```

This section defines the worksheet header and footer image position types enumeration.

```go
const (
HeaderFooterImagePositionLeft HeaderFooterImagePositionType = iota
HeaderFooterImagePositionCenter
HeaderFooterImagePositionRight
)
```

## Create Excel document {#NewFile}

```go
Expand Down Expand Up @@ -479,6 +495,8 @@ Index|Paper Size

`BlackAndWhite` specified print black and white.

`PageOrder` specifies the ordering of multiple pages. Values accepted: `overThenDown` and `downThenOver`.

For example, set page layout for `Sheet1` with print black and white, first printed page number from `2`, landscape A4 small paper (210 mm by 297 mm), 2 vertical pages to fit on, and 2 horizontal pages to fit:

```go
Expand Down Expand Up @@ -637,7 +655,7 @@ The following formatting codes can be used in 6 string type fields: `OddHeader`,
</tr>
<tr>
<td><code>&amp;G</code></td>
<td>Drawing object as background (Not support currently)</td>
<td>Drawing object as background (Use AddHeaderFooterImage)</td>
</tr>
<tr>
<td><code>&amp;H</code></td>
Expand Down Expand Up @@ -723,6 +741,14 @@ This example shows:
- The text "Center Bold Header" on the first line of the center section of the first page, and the date on the second line of the center section of that same page
- No footer on the first page
## Add header and footer image {#AddHeaderFooterImage}
```go
func (f *File) AddHeaderFooterImage(sheet string, opts *HeaderFooterImageOptions) error
```
AddHeaderFooterImage provides a mechanism to set the graphics that can be referenced in the header and footer definitions via `&G`, supported image types: EMF, EMZ, GIF, JPEG, JPG, PNG, SVG, TIF, TIFF, WMF and WMZ.
## Set defined name {#SetDefinedName}
```go
Expand Down

0 comments on commit d570f99

Please sign in to comment.