、それは{vert,horiz}_page_breaks
がBIFFRecords.{Vertical,Horizontal}PageBreaksRecord
に渡されてしまう性質(ソース分布のWorksheet.py
を参照)(BIFFRecords.py
参照)が判明しました。最後の2つのクラスはと記載されています。
class HorizontalPageBreaksRecord(BiffRecord):
"""
This record is part of the Page Settings Block. It contains all
horizontal manual page breaks.
Record HORIZONTALPAGEBREAKS, BIFF8:
Offset Size Contents
0 2 Number of following row index structures (nm)
2 6nm List of nm row index structures. Each row index
structure contains:
Offset Size Contents
0 2 Index to first row below the page break
2 2 Index to first column of this page break
4 2 Index to last column of this page break
The row indexes in the lists must be ordered ascending.
If in BIFF8 a row contains several page breaks, they must be ordered
ascending by start column index.
"""
class VerticalPageBreaksRecord(BiffRecord):
"""
This record is part of the Page Settings Block. It contains all
vertical manual page breaks.
Record VERTICALPAGEBREAKS, BIFF8:
Offset Size Contents
0 2 Number of following column index structures (nm)
2 6nm List of nm column index structures. Each column index
structure contains:
Offset Size Contents
0 2 Index to first column following the page
break
2 2 Index to first row of this page break
4 2 Index to last row of this page break
The column indexes in the lists must be ordered ascending.
If in BIFF8 a column contains several page breaks, they must be ordered
ascending by start row index.
"""
まあ、遊んだ後、各タプルの最初の数字は行番号のように見えます。私は他の数字が何であるか分かりません。助けて! – Greg
回答ありがとうございます。好奇心が強い人は、カラムの値が変わるたびにページ区切りを挿入するための簡単なユーティリティを作成しました:http://utilitymill.com/utility/excel_page_breaks_at_col_value_change(「ソースを表示」リンクをクリックすると、コードを見ることができますそれを行うには) – Greg
xlwtを使用してページ区切りの同じ問題に直面しています。あなたのリンクにはauthanticationが必要です –