簡體   English   中英

在 ms-xlsb 工作表中,brtcolortab 和 rwsync 之間未記錄的 6 個字節是什么

[英]In a ms-xlsb worksheet what are the undocumented 6 bytes between brtcolortab and rwsync

我正在嘗試編寫一個應用程序來讀取 XLSB 文件。 我在這里使用規范https://interoperability.blob.core.windows.net/files/MS-XLSB/%5bMS-XLSB%5d.pdf 我的主要目標(現在)是閱讀工作表 CELLTABLE ,它要求我閱讀它之前的結構。 我已經閱讀了 BrtWSDim 記錄。 我擔心的是有兩個字節字符串以似乎沒有記錄的格式出現。 誰能指出我在哪里可以了解更多關於這些無證地區的信息? 我在下面將它們標記為“保留(未記錄)”:

All bits/bytes displayed little endian

A - fShowAutoBreaks (1 bit): 1  
B - reserved1 (2 bits): 00  
C - fPublish (1 bit): 0  
D - fDialog (1 bit): 0  
E - fApplyStyles (1 bit): 0  
F - fRowSumsBelow (1 bit): 0  
G - fColSumsRight (1 bit): 1  
H - fFitToPage (1 bit): 1  
I - reserved2 (1 bit): 0  
J - fShowOutlineSymbols (1 bit): 0  
K - reserved3 (1 bit): 0  
L - fSyncHoriz (1 bit): 0  
M - fSyncVert (1 bit): 0  
N - fAltExprEval (1 bit): 0  
O - fAltFormulaEntry (1 bit): 0  
P - fFilterMode (1 bit): 0  
Q - fCondFmtCalc (1 bit): 0  
reserved4 (6 bits): 000000  
brtcolorTab (8 bytes): 1100100110000000110001001001001100100000010000000000000000000010  
reserved (undocumented) (6 bytes): 000000000000000000000000000000000000000000000000  
rwSync (4 bytes): 11111111111111111111111111111111  
colSync (4 bytes): 11111111111111111111111111111111  
strName.cchCharacters (CodeName): 01100000000000000000000000000000 Payload: Sheet1
reserved (undocumented) (3 bytes): 001010011000000000001000  
brtWsDim.rwFirst (4 bytes): 00000000000000000000000000000000 IntVal: 0  
brtWsDim.rwLast (4 bytes): 01000000000000000000000000000000 IntVal: 2  
brtWsDim.colFirst (4 bytes): 00000000000000000000000000000000 IntVal: 0  
brtWsDim.colLast (4 bytes): 01000000000000000000000000000000 IntVal: 2  
'''

看起來我錯過了規范中解釋每條記錄以 header 開頭的部分,它給出了記錄類型 ID 和記錄的大小(以字節為單位)。 正是這些位導致了上面的字段未對齊,我誤認為是未記錄的字段。 這是我在對記錄標題進行必要修改后的結果:

All bits and bytes displayed little endian

Record Type (max 2 bytes): 10000001 10000000 Byte Count: 2 IntVal 129 Name BrtBeginSheet <--the 129 is the record type BrtBeginSheet is a lookup for the type name
Record Size in Bytes (max 4 bytes): 00000000 Byte Count: 1 IntVal 0 <--this is the size of the record in bytes
Record Type (max 2 bytes): 11001001 10000000 Byte Count: 2 IntVal 147 Name BrtWsProp
Record Size in Bytes (max 4 bytes): 11000100 Byte Count: 1 IntVal 35
A - fShowAutoBreaks (1 bit): 1 
B - reserved1 (2 bits): 00 
C - fPublish (1 bit): 1 
D - fDialog (1 bit): 0 
E - fApplyStyles (1 bit): 0 
F - fRowSumsBelow (1 bit): 1 
G - fColSumsRight (1 bit): 1 
H - fFitToPage (1 bit): 0 
I - reserved2 (1 bit): 0 
J - fShowOutlineSymbols (1 bit): 1 
K - reserved3 (1 bit): 0 
L - fSyncHoriz (1 bit): 0 
M - fSyncVert (1 bit): 0 
N - fAltExprEval (1 bit): 0 
O - fAltFormulaEntry (1 bit): 0 
P - fFilterMode (1 bit): 0 
Q - fCondFmtCalc (1 bit): 1 
reserved4 (6 bits): 000000 
brtcolorTab (8 bytes): 0000000000000010000000000000000000000000000000000000000000000000 
rwSync (4 bytes): 11111111111111111111111111111111 
colSync (4 bytes): 11111111111111111111111111111111 
strName.cchCharacters (CodeName): 01100000000000000000000000000000 payload: Sheet1
Next Byte: 41.0
Next Byte: 41
Record Type (max 2 bytes): 00101001 10000000 Byte Count: 2 IntVal 148 Name BrtWsDim
Record Size in Bytes (max 4 bytes): 00001000 Byte Count: 1 IntVal 16
brtWsDim.rwFirst (4 bytes): 00000000000000000000000000000000 IntVal: 0 
brtWsDim.rwLast (4 bytes): 11000000000000000000000000000000 IntVal: 3 <-- modified the file so it's a little bigger
brtWsDim.colFirst (4 bytes): 00000000000000000000000000000000 IntVal: 0 
brtWsDim.colLast (4 bytes): 11000000000000000000000000000000 IntVal: 3 <-- modified the file so it's a little bigger
Record Type (max 2 bytes): 10100001 10000000 Byte Count: 2 IntVal 133 Name BrtBeginWsViews
Record Size in Bytes (max 4 bytes): 00000000 Byte Count: 1 IntVal 0

希望這對我以外的人有用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM