Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print titles #1015

Closed
victotyone opened this issue Sep 6, 2021 · 3 comments
Closed

print titles #1015

victotyone opened this issue Sep 6, 2021 · 3 comments
Labels
kind/documentation Improvements or additions to documentation

Comments

@victotyone
Copy link

Is it possible to set repeat print titles for specific lines in print settings?

@victotyone victotyone reopened this Sep 6, 2021
@victotyone victotyone changed the title hi ~ print titles Sep 6, 2021
@xuri
Copy link
Member

xuri commented Sep 6, 2021

Thanks for your issue, please reference the documentation of the SetDefinedName, for example, set print titles with rows to repeat at the top using the first row on Sheet1 like this:

f.SetDefinedName(&excelize.DefinedName{
    Name:     "_xlnm.Print_Titles",
    RefersTo: "Sheet1!$A:$A,Sheet1!$1:$1",
    Scope:    "Sheet1",
})

@xuri xuri closed this as completed Sep 7, 2021
@dami-izolan-axon
Copy link

@xuri

I found out today (v2.8.1) that if you fill the RefersTo property with only one range without a comma (instead of two separated with a comma), it will work as row title only. You don't need to fill a column title.

It would be cool if this was added to the docs.

xuri added a commit to xuri/excelize-doc that referenced this issue Aug 24, 2024
xuri added a commit that referenced this issue Sep 21, 2024
- Add new field `ClassicLayout` in the `PivotTableOptions`
- Add a new exported error variable `ErrPivotTableClassicLayout`
- Update unit tests
- Add documentation for the SetDefinedName function, ref #1015
@xuri
Copy link
Member

xuri commented Sep 21, 2024

Hi @dami-izolan-axon, thanks for your suggestion. I updated documentation and godoc for this.

@xuri xuri added the kind/documentation Improvements or additions to documentation label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants