yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | package Spreadsheet::ParseExcel::Dump; |
| 2 | |
| 3 | ############################################################################### |
| 4 | # |
| 5 | # Spreadsheet::ParseExcel::Dump - A class for dumping Excel records. |
| 6 | # |
| 7 | # Used in conjunction with Spreadsheet::ParseExcel. |
| 8 | # |
| 9 | # Copyright (c) 2009 John McNamara |
| 10 | # Copyright (c) 2006-2008 Gabor Szabo |
| 11 | # Copyright (c) 2000-2006 Kawai Takanori |
| 12 | # |
| 13 | # perltidy with standard settings. |
| 14 | # |
| 15 | # Documentation after __END__ |
| 16 | # |
| 17 | |
| 18 | use strict; |
| 19 | use warnings; |
| 20 | |
| 21 | our $VERSION = '0.59'; |
| 22 | |
| 23 | my %NameTbl = ( |
| 24 | |
| 25 | #P291 |
| 26 | 0x0A => 'EOF', |
| 27 | 0x0C => 'CALCCOUNT', |
| 28 | 0x0D => 'CALCMODE', |
| 29 | 0x0E => 'PRECISION', |
| 30 | 0x0F => 'REFMODE', |
| 31 | 0x10 => 'DELTA', |
| 32 | 0x11 => 'ITERATION', |
| 33 | 0x12 => 'PROTECT', |
| 34 | 0x13 => 'PASSWORD', |
| 35 | 0x14 => 'HEADER', |
| 36 | |
| 37 | 0x15 => 'FOOTER', |
| 38 | 0x16 => 'EXTERNCOUNT', |
| 39 | 0x17 => 'EXTERNSHEET', |
| 40 | 0x19 => 'WINDOWPROTECT', |
| 41 | 0x1A => 'VERTICALPAGEBREAKS', |
| 42 | 0x1B => 'HORIZONTALPAGEBREAKS', |
| 43 | 0x1C => 'NOTE', |
| 44 | 0x1D => 'SELECTION', |
| 45 | 0x22 => '1904', |
| 46 | 0x26 => 'LEFTMARGIN', |
| 47 | |
| 48 | 0x27 => 'RIGHTMARGIN', |
| 49 | 0x28 => 'TOPMARGIN', |
| 50 | 0x29 => 'BOTTOMMARGIN', |
| 51 | 0x2A => 'PRINTHEADERS', |
| 52 | 0x2B => 'PRINTGRIDLINES', |
| 53 | 0x2F => 'FILEPASS', |
| 54 | 0x3C => 'COUNTINUE', |
| 55 | 0x3D => 'WINDOW1', |
| 56 | 0x40 => 'BACKUP', |
| 57 | 0x41 => 'PANE', |
| 58 | |
| 59 | 0x42 => 'CODEPAGE', |
| 60 | 0x4D => 'PLS', |
| 61 | 0x50 => 'DCON', |
| 62 | 0x51 => 'DCONREF', |
| 63 | |
| 64 | #P292 |
| 65 | 0x52 => 'DCONNAME', |
| 66 | 0x55 => 'DEFCOLWIDTH', |
| 67 | 0x59 => 'XCT', |
| 68 | 0x5A => 'CRN', |
| 69 | 0x5B => 'FILESHARING', |
| 70 | 0x5C => 'WRITEACCES', |
| 71 | 0x5D => 'OBJ', |
| 72 | 0x5E => 'UNCALCED', |
| 73 | 0x5F => 'SAVERECALC', |
| 74 | 0x60 => 'TEMPLATE', |
| 75 | |
| 76 | 0x63 => 'OBJPROTECT', |
| 77 | 0x7D => 'COLINFO', |
| 78 | 0x7E => 'RK', |
| 79 | 0x7F => 'IMDATA', |
| 80 | 0x80 => 'GUTS', |
| 81 | 0x81 => 'WSBOOL', |
| 82 | 0x82 => 'GRIDSET', |
| 83 | 0x83 => 'HCENTER', |
| 84 | 0x84 => 'VCENTER', |
| 85 | 0x85 => 'BOUNDSHEET', |
| 86 | |
| 87 | 0x86 => 'WRITEPROT', |
| 88 | 0x87 => 'ADDIN', |
| 89 | 0x88 => 'EDG', |
| 90 | 0x89 => 'PUB', |
| 91 | 0x8C => 'COUNTRY', |
| 92 | 0x8D => 'HIDEOBJ', |
| 93 | 0x90 => 'SORT', |
| 94 | 0x91 => 'SUB', |
| 95 | 0x92 => 'PALETTE', |
| 96 | 0x94 => 'LHRECORD', |
| 97 | |
| 98 | 0x95 => 'LHNGRAPH', |
| 99 | 0x96 => 'SOUND', |
| 100 | 0x98 => 'LPR', |
| 101 | 0x99 => 'STANDARDWIDTH', |
| 102 | 0x9A => 'FNGROUPNAME', |
| 103 | 0x9B => 'FILTERMODE', |
| 104 | 0x9C => 'FNGROUPCOUNT', |
| 105 | |
| 106 | #P293 |
| 107 | 0x9D => 'AUTOFILTERINFO', |
| 108 | 0x9E => 'AUTOFILTER', |
| 109 | 0xA0 => 'SCL', |
| 110 | 0xA1 => 'SETUP', |
| 111 | 0xA9 => 'COORDLIST', |
| 112 | 0xAB => 'GCW', |
| 113 | 0xAE => 'SCENMAN', |
| 114 | 0xAF => 'SCENARIO', |
| 115 | 0xB0 => 'SXVIEW', |
| 116 | 0xB1 => 'SXVD', |
| 117 | |
| 118 | 0xB2 => 'SXV', |
| 119 | 0xB4 => 'SXIVD', |
| 120 | 0xB5 => 'SXLI', |
| 121 | 0xB6 => 'SXPI', |
| 122 | 0xB8 => 'DOCROUTE', |
| 123 | 0xB9 => 'RECIPNAME', |
| 124 | 0xBC => 'SHRFMLA', |
| 125 | 0xBD => 'MULRK', |
| 126 | 0xBE => 'MULBLANK', |
| 127 | 0xBF => 'TOOLBARHDR', |
| 128 | 0xC0 => 'TOOLBAREND', |
| 129 | 0xC1 => 'MMS', |
| 130 | |
| 131 | 0xC2 => 'ADDMENU', |
| 132 | 0xC3 => 'DELMENU', |
| 133 | 0xC5 => 'SXDI', |
| 134 | 0xC6 => 'SXDB', |
| 135 | 0xCD => 'SXSTRING', |
| 136 | 0xD0 => 'SXTBL', |
| 137 | 0xD1 => 'SXTBRGIITM', |
| 138 | 0xD2 => 'SXTBPG', |
| 139 | 0xD3 => 'OBPROJ', |
| 140 | 0xD5 => 'SXISDTM', |
| 141 | |
| 142 | 0xD6 => 'RSTRING', |
| 143 | 0xD7 => 'DBCELL', |
| 144 | 0xDA => 'BOOKBOOL', |
| 145 | 0xDC => 'PARAMQRY', |
| 146 | 0xDC => 'SXEXT', |
| 147 | 0xDD => 'SCENPROTECT', |
| 148 | 0xDE => 'OLESIZE', |
| 149 | |
| 150 | #P294 |
| 151 | 0xDF => 'UDDESC', |
| 152 | 0xE0 => 'XF', |
| 153 | 0xE1 => 'INTERFACEHDR', |
| 154 | 0xE2 => 'INTERFACEEND', |
| 155 | 0xE3 => 'SXVS', |
| 156 | 0xEA => 'TABIDCONF', |
| 157 | 0xEB => 'MSODRAWINGGROUP', |
| 158 | 0xEC => 'MSODRAWING', |
| 159 | 0xED => 'MSODRAWINGSELECTION', |
| 160 | 0xEF => 'PHONETICINFO', |
| 161 | 0xF0 => 'SXRULE', |
| 162 | |
| 163 | 0xF1 => 'SXEXT', |
| 164 | 0xF2 => 'SXFILT', |
| 165 | 0xF6 => 'SXNAME', |
| 166 | 0xF7 => 'SXSELECT', |
| 167 | 0xF8 => 'SXPAIR', |
| 168 | 0xF9 => 'SXFMLA', |
| 169 | 0xFB => 'SXFORMAT', |
| 170 | 0xFC => 'SST', |
| 171 | 0xFD => 'LABELSST', |
| 172 | 0xFF => 'EXTSST', |
| 173 | |
| 174 | 0x100 => 'SXVDEX', |
| 175 | 0x103 => 'SXFORMULA', |
| 176 | 0x122 => 'SXDBEX', |
| 177 | 0x13D => 'TABID', |
| 178 | 0x160 => 'USESELFS', |
| 179 | 0x161 => 'DSF', |
| 180 | 0x162 => 'XL5MODIFY', |
| 181 | 0x1A5 => 'FILESHARING2', |
| 182 | 0x1A9 => 'USERBVIEW', |
| 183 | 0x1AA => 'USERVIEWBEGIN', |
| 184 | |
| 185 | 0x1AB => 'USERSVIEWEND', |
| 186 | 0x1AD => 'QSI', |
| 187 | 0x1AE => 'SUPBOOK', |
| 188 | 0x1AF => 'PROT4REV', |
| 189 | 0x1B0 => 'CONDFMT', |
| 190 | 0x1B1 => 'CF', |
| 191 | 0x1B2 => 'DVAL', |
| 192 | |
| 193 | #P295 |
| 194 | 0x1B5 => 'DCONBIN', |
| 195 | 0x1B6 => 'TXO', |
| 196 | 0x1B7 => 'REFRESHALL', |
| 197 | 0x1B8 => 'HLINK', |
| 198 | 0x1BA => 'CODENAME', |
| 199 | 0x1BB => 'SXFDBTYPE', |
| 200 | 0x1BC => 'PROT4REVPASS', |
| 201 | 0x1BE => 'DV', |
| 202 | 0x200 => 'DIMENSIONS', |
| 203 | 0x201 => 'BLANK', |
| 204 | |
| 205 | 0x202 => 'Integer', #Not Documented |
| 206 | 0x203 => 'NUMBER', |
| 207 | 0x204 => 'LABEL', |
| 208 | 0x205 => 'BOOLERR', |
| 209 | 0x207 => 'STRING', |
| 210 | 0x208 => 'ROW', |
| 211 | 0x20B => 'INDEX', |
| 212 | 0x218 => 'NAME', |
| 213 | 0x221 => 'ARRAY', |
| 214 | 0x223 => 'EXTERNNAME', |
| 215 | 0x225 => 'DEFAULTROWHEIGHT', |
| 216 | |
| 217 | 0x231 => 'FONT', |
| 218 | 0x236 => 'TABLE', |
| 219 | 0x23E => 'WINDOW2', |
| 220 | 0x293 => 'STYLE', |
| 221 | 0x406 => 'FORMULA', |
| 222 | 0x41E => 'FORMAT', |
| 223 | |
| 224 | 0x18 => 'NAME', |
| 225 | |
| 226 | 0x06 => 'FORMULA', |
| 227 | |
| 228 | 0x09 => 'BOF(BIFF2)', |
| 229 | 0x209 => 'BOF(BIFF3)', |
| 230 | 0x409 => 'BOF(BIFF4)', |
| 231 | 0x809 => 'BOF(BIFF5-7)', |
| 232 | |
| 233 | 0x31 => 'FONT', 0x27E => 'RK', |
| 234 | |
| 235 | #Chart/Graph |
| 236 | 0x1001 => 'UNITS', |
| 237 | 0x1002 => 'CHART', |
| 238 | 0x1003 => 'SERISES', |
| 239 | 0x1006 => 'DATAFORMAT', |
| 240 | 0x1007 => 'LINEFORMAT', |
| 241 | 0x1009 => 'MAKERFORMAT', |
| 242 | 0x100A => 'AREAFORMAT', |
| 243 | 0x100B => 'PIEFORMAT', |
| 244 | 0x100C => 'ATTACHEDLABEL', |
| 245 | 0x100D => 'SERIESTEXT', |
| 246 | 0x1014 => 'CHARTFORMAT', |
| 247 | 0x1015 => 'LEGEND', |
| 248 | 0x1016 => 'SERIESLIST', |
| 249 | 0x1017 => 'BAR', |
| 250 | 0x1018 => 'LINE', |
| 251 | 0x1019 => 'PIE', |
| 252 | 0x101A => 'AREA', |
| 253 | 0x101B => 'SCATTER', |
| 254 | 0x101C => 'CHARTLINE', |
| 255 | 0x101D => 'AXIS', |
| 256 | 0x101E => 'TICK', |
| 257 | 0x101F => 'VALUERANGE', |
| 258 | 0x1020 => 'CATSERRANGE', |
| 259 | 0x1021 => 'AXISLINEFORMAT', |
| 260 | 0x1022 => 'CHARTFORMATLINK', |
| 261 | 0x1024 => 'DEFAULTTEXT', |
| 262 | 0x1025 => 'TEXT', |
| 263 | 0x1026 => 'FONTX', |
| 264 | 0x1027 => 'OBJECTLINK', |
| 265 | 0x1032 => 'FRAME', |
| 266 | 0x1033 => 'BEGIN', |
| 267 | 0x1034 => 'END', |
| 268 | 0x1035 => 'PLOTAREA', |
| 269 | 0x103A => '3D', |
| 270 | 0x103C => 'PICF', |
| 271 | 0x103D => 'DROPBAR', |
| 272 | 0x103E => 'RADAR', |
| 273 | 0x103F => 'SURFACE', |
| 274 | 0x1040 => 'RADARAREA', |
| 275 | 0x1041 => 'AXISPARENT', |
| 276 | 0x1043 => 'LEGENDXN', |
| 277 | 0x1044 => 'SHTPROPS', |
| 278 | 0x1045 => 'SERTOCRT', |
| 279 | 0x1046 => 'AXESUSED', |
| 280 | 0x1048 => 'SBASEREF', |
| 281 | 0x104A => 'SERPARENT', |
| 282 | 0x104B => 'SERAUXTREND', |
| 283 | 0x104E => 'IFMT', |
| 284 | 0x104F => 'POS', |
| 285 | 0x1050 => 'ALRUNS', |
| 286 | 0x1051 => 'AI', |
| 287 | 0x105B => 'SERAUXERRBAR', |
| 288 | 0x105D => 'SERFMT', |
| 289 | 0x1060 => 'FBI', |
| 290 | 0x1061 => 'BOPPOP', |
| 291 | 0x1062 => 'AXCEXT', |
| 292 | 0x1063 => 'DAT', |
| 293 | 0x1064 => 'PLOTGROWTH', |
| 294 | 0x1065 => 'SINDEX', |
| 295 | 0x1066 => 'GELFRAME', |
| 296 | 0x1067 => 'BPOPPOPCUSTOM', |
| 297 | ); |
| 298 | |
| 299 | #------------------------------------------------------------------------------ |
| 300 | # subDUMP (for Spreadsheet::ParseExcel) |
| 301 | #------------------------------------------------------------------------------ |
| 302 | sub subDUMP { |
| 303 | my ( $oBook, $bOp, $bLen, $sWk ) = @_; |
| 304 | printf "%04X:%-23s (Len:%3d) : %s\n", |
| 305 | $bOp, OpName($bOp), $bLen, unpack( "H40", $sWk ); |
| 306 | } |
| 307 | |
| 308 | #------------------------------------------------------------------------------ |
| 309 | # Spreadsheet::ParseExcel->OpName |
| 310 | #------------------------------------------------------------------------------ |
| 311 | sub OpName { |
| 312 | my ($bOp) = @_; |
| 313 | return ( defined $NameTbl{$bOp} ) ? $NameTbl{$bOp} : 'undef'; |
| 314 | } |
| 315 | |
| 316 | 1; |
| 317 | |
| 318 | __END__ |
| 319 | |
| 320 | =pod |
| 321 | |
| 322 | =head1 NAME |
| 323 | |
| 324 | Spreadsheet::ParseExcel::Dump - A class for dumping Excel records. |
| 325 | |
| 326 | =head1 SYNOPSIS |
| 327 | |
| 328 | See the documentation for Spreadsheet::ParseExcel. |
| 329 | |
| 330 | =head1 DESCRIPTION |
| 331 | |
| 332 | This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel. |
| 333 | |
| 334 | =head1 AUTHOR |
| 335 | |
| 336 | Maintainer 0.40+: John McNamara jmcnamara@cpan.org |
| 337 | |
| 338 | Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org |
| 339 | |
| 340 | Original author: Kawai Takanori kwitknr@cpan.org |
| 341 | |
| 342 | =head1 COPYRIGHT |
| 343 | |
| 344 | Copyright (c) 2009-2010 John McNamara |
| 345 | |
| 346 | Copyright (c) 2006-2008 Gabor Szabo |
| 347 | |
| 348 | Copyright (c) 2000-2006 Kawai Takanori |
| 349 | |
| 350 | All rights reserved. |
| 351 | |
| 352 | You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. |
| 353 | |
| 354 | =cut |
| 355 | |