Skip to content

How to set up the page as landscape? #318

@greymanking

Description

@greymanking

I must generate xlsx files which have more than ten columns and the page should be set as landscape to hold all the columns. I searched your source and all issues to figure out how to make it but failed. I am wondering if you guys can provide a way out. Thanks.

Activity

xuri

xuri commented on Dec 26, 2018

@xuri
Member

Hi @greymanking, this library doesn't support to set page orientation currently. I will add this feature later.

greymanking

greymanking commented on Jan 4, 2019

@greymanking
Author

Hi @xuri, I am wondering when you could add the page orientation setup. 坐等。

added a commit that references this issue on Jan 6, 2019
034de7a
added a commit that references this issue on Jan 6, 2019
055d3fa
xuri

xuri commented on Jan 7, 2019

@xuri
Member

Hi @greymanking, excelize support set page orientation now, you can set that like this:

xlsx := excelize.NewFile()
err := xlsx.SetPageLayout(
	"Sheet1",
	excelize.PageLayoutOrientation(excelize.OrientationLandscape),
)
greymanking

greymanking commented on Feb 18, 2019

@greymanking
Author

@xuri It just works. Thank u guys.

added 2 commits that reference this issue on Oct 23, 2020
a2ec34d
145244d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xuri@greymanking

        Issue actions

          How to set up the page as landscape? · Issue #318 · qax-os/excelize