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
Page view can be set to 'pageBreakPreview' #576
Conversation
@jmcnamara @patrickziegler I would like to use this feature - is there some reason not to merge it yet? Thank you |
Mainly because there were hardly any requests for this feature and it would need some more tests before I could merge it. But if there is interest I can move it up the TODO list (probably at the end of this month). |
Got it, ok, thank you. |
362941d
to
06dae72
Compare
06dae72
to
719e3f7
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hey together, after seeing your comments, I revisited this again and removed one unnecessary change. If you have further suggestions for improvement, I would add them too. @amk26cap as a quick alternative, I used something along the following lines back then. class WorksheetFixed(xlsxwriter.worksheet.Worksheet):
def set_page_view(self, view="pageLayout"):
self.page_view = view |
635e1d3
to
4d014cb
Compare
I've added this as a feature to XlsxWriter v3.1.2 via the import xlsxwriter
workbook = xlsxwriter.Workbook("test.xlsx")
worksheet = workbook.add_worksheet()
worksheet.write("A1", "Hello")
worksheet.write("Z100", "Hello")
worksheet.set_h_pagebreaks([10, 20, 30, 40])
worksheet.set_pagebreak_view()
workbook.close() Output: Thanks for the PR and the prompt. |
This commit adds the optional argument
view
toWorksheet.set_page_view(self, view="pageLayout")
to enable the user to select other page views such as"pageBreakPreview"
.This commit does not change the API in any way. Two test functions have been added and the documentation was updated.
Fixes #575