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

How to set up the page as landscape? #318

Closed
greymanking opened this Issue Dec 26, 2018 · 3 comments

Comments

2 participants
@greymanking
Copy link

greymanking commented Dec 26, 2018

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.

@xuri

This comment has been minimized.

Copy link
Member

xuri commented Dec 26, 2018

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

@xuri xuri added the enhancement label Dec 26, 2018

@greymanking

This comment has been minimized.

Copy link

greymanking commented Jan 4, 2019

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

@xuri xuri added this to Features in Release v1.4.2 Jan 6, 2019

@xuri xuri closed this in 034de7a Jan 6, 2019

xuri added a commit that referenced this issue Jan 6, 2019

Merge pull request #330 from zhangleijlu/master
Resolve #318, add new functions `SetPageLayout` and `GetPageLayout`

Release v1.4.2 automation moved this from Features to Bug fixes Jan 6, 2019

@xuri

This comment has been minimized.

Copy link
Member

xuri commented Jan 7, 2019

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),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment