/usr/share/doc/python-xlrd-docs/api.html is in python-xlrd-docs 1.1.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>API Reference — xlrd 1.1.0 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Installation Instructions" href="installation.html" />
<link rel="prev" title="XML vulnerabilities and Excel files" href="vulnerabilities.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation Instructions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vulnerabilities.html" title="XML vulnerabilities and Excel files"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">xlrd 1.1.0 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="api-reference">
<h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-xlrd">
<span id="xlrd"></span><h2>xlrd<a class="headerlink" href="#module-xlrd" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="xlrd.open_workbook">
<code class="descclassname">xlrd.</code><code class="descname">open_workbook</code><span class="sig-paren">(</span><em>filename=None</em>, <em>logfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em>, <em>verbosity=0</em>, <em>use_mmap=1</em>, <em>file_contents=None</em>, <em>encoding_override=None</em>, <em>formatting_info=False</em>, <em>on_demand=False</em>, <em>ragged_rows=False</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.open_workbook" title="Permalink to this definition">¶</a></dt>
<dd><p>Open a spreadsheet file for data extraction.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>filename</strong> – The path to the spreadsheet file to be opened.</li>
<li><strong>logfile</strong> – An open file to which messages and diagnostics are written.</li>
<li><strong>verbosity</strong> – Increases the volume of trace material written to the
logfile.</li>
<li><strong>use_mmap</strong> – <p>Whether to use the mmap module is determined heuristically.
Use this arg to override the result.</p>
<p>Current heuristic: mmap is used if it exists.</p>
</li>
<li><strong>file_contents</strong> – A string or an <code class="xref py py-class docutils literal"><span class="pre">mmap.mmap</span></code> object or some other behave-alike
object. If <code class="docutils literal"><span class="pre">file_contents</span></code> is supplied, <code class="docutils literal"><span class="pre">filename</span></code> will not be used,
except (possibly) in messages.</li>
<li><strong>encoding_override</strong> – Used to overcome missing or bad codepage information
in older-version files. See <a class="reference internal" href="unicode.html"><span class="doc">Handling of Unicode</span></a>.</li>
<li><strong>formatting_info</strong> – <p>The default is <code class="docutils literal"><span class="pre">False</span></code>, which saves memory.
In this case, “Blank” cells, which are those with their own formatting
information but no data, are treated as empty by ignoring the file’s
<code class="docutils literal"><span class="pre">BLANK</span></code> and <code class="docutils literal"><span class="pre">MULBLANK</span></code> records.
This cuts off any bottom or right “margin” of rows of empty or blank
cells.
Only <a class="reference internal" href="#xlrd.sheet.Sheet.cell_value" title="xlrd.sheet.Sheet.cell_value"><code class="xref py py-meth docutils literal"><span class="pre">cell_value()</span></code></a> and
<a class="reference internal" href="#xlrd.sheet.Sheet.cell_type" title="xlrd.sheet.Sheet.cell_type"><code class="xref py py-meth docutils literal"><span class="pre">cell_type()</span></code></a> are available.</p>
<p>When <code class="docutils literal"><span class="pre">True</span></code>, formatting information will be read from the spreadsheet
file. This provides all cells, including empty and blank cells.
Formatting information is available for each cell.</p>
<p>Note that this will raise a NotImplementedError when used with an
xlsx file.</p>
</li>
<li><strong>on_demand</strong> – Governs whether sheets are all loaded initially or when demanded
by the caller. See <a class="reference internal" href="on_demand.html"><span class="doc">Loading worksheets on demand</span></a>.</li>
<li><strong>ragged_rows</strong> – <p>The default of <code class="docutils literal"><span class="pre">False</span></code> means all rows are padded out with empty cells so
that all rows have the same size as found in
<a class="reference internal" href="#xlrd.sheet.Sheet.ncols" title="xlrd.sheet.Sheet.ncols"><code class="xref py py-attr docutils literal"><span class="pre">ncols</span></code></a>.</p>
<p><code class="docutils literal"><span class="pre">True</span></code> means that there are no empty cells at the ends of rows.
This can result in substantial memory savings if rows are of widely
varying sizes. See also the <a class="reference internal" href="#xlrd.sheet.Sheet.row_len" title="xlrd.sheet.Sheet.row_len"><code class="xref py py-meth docutils literal"><span class="pre">row_len()</span></code></a> method.</p>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An instance of the <a class="reference internal" href="#xlrd.book.Book" title="xlrd.book.Book"><code class="xref py py-class docutils literal"><span class="pre">Book</span></code></a> class.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="xlrd.dump">
<code class="descclassname">xlrd.</code><code class="descname">dump</code><span class="sig-paren">(</span><em>filename</em>, <em>outfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em>, <em>unnumbered=False</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.dump" title="Permalink to this definition">¶</a></dt>
<dd><p>For debugging: dump an XLS file’s BIFF records in char & hex.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>filename</strong> – The path to the file to be dumped.</li>
<li><strong>outfile</strong> – An open file, to which the dump is written.</li>
<li><strong>unnumbered</strong> – If true, omit offsets (for meaningful diffs).</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="xlrd.count_records">
<code class="descclassname">xlrd.</code><code class="descname">count_records</code><span class="sig-paren">(</span><em>filename</em>, <em>outfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.count_records" title="Permalink to this definition">¶</a></dt>
<dd><p>For debugging and analysis: summarise the file’s BIFF records.
ie: produce a sorted file of <code class="docutils literal"><span class="pre">(record_name,</span> <span class="pre">count)</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>filename</strong> – The path to the file to be summarised.</li>
<li><strong>outfile</strong> – An open file, to which the summary is written.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-xlrd.biffh">
<span id="xlrd-biffh"></span><h2>xlrd.biffh<a class="headerlink" href="#module-xlrd.biffh" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="xlrd.biffh.XLRDError">
<em class="property">exception </em><code class="descclassname">xlrd.biffh.</code><code class="descname">XLRDError</code><a class="headerlink" href="#xlrd.biffh.XLRDError" title="Permalink to this definition">¶</a></dt>
<dd><p>An exception indicating problems reading data from an Excel file.</p>
</dd></dl>
<dl class="class">
<dt id="xlrd.biffh.BaseObject">
<em class="property">class </em><code class="descclassname">xlrd.biffh.</code><code class="descname">BaseObject</code><a class="headerlink" href="#xlrd.biffh.BaseObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Parent of almost all other classes in the package. Defines a common
<a class="reference internal" href="#xlrd.biffh.BaseObject.dump" title="xlrd.biffh.BaseObject.dump"><code class="xref py py-meth docutils literal"><span class="pre">dump()</span></code></a> method for debugging.</p>
<dl class="method">
<dt id="xlrd.biffh.BaseObject.dump">
<code class="descname">dump</code><span class="sig-paren">(</span><em>f=None</em>, <em>header=None</em>, <em>footer=None</em>, <em>indent=0</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.biffh.BaseObject.dump" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>f</strong> – open file object, to which the dump is written</li>
<li><strong>header</strong> – text to write before the dump</li>
<li><strong>footer</strong> – text to write after the dump</li>
<li><strong>indent</strong> – number of leading spaces (for recursive calls)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="data">
<dt id="xlrd.biffh.error_text_from_code">
<code class="descclassname">xlrd.biffh.</code><code class="descname">error_text_from_code</code><em class="property"> = {0: '#NULL!', 7: '#DIV/0!', 15: '#VALUE!', 23: '#REF!', 29: '#NAME?', 36: '#NUM!', 42: '#N/A'}</em><a class="headerlink" href="#xlrd.biffh.error_text_from_code" title="Permalink to this definition">¶</a></dt>
<dd><p>This dictionary can be used to produce a text version of the internal codes
that Excel uses for error cells.</p>
</dd></dl>
<dl class="function">
<dt id="xlrd.biffh.unpack_unicode">
<code class="descclassname">xlrd.biffh.</code><code class="descname">unpack_unicode</code><span class="sig-paren">(</span><em>data</em>, <em>pos</em>, <em>lenlen=2</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.biffh.unpack_unicode" title="Permalink to this definition">¶</a></dt>
<dd><p>Return unicode_strg</p>
</dd></dl>
<dl class="function">
<dt id="xlrd.biffh.unpack_unicode_update_pos">
<code class="descclassname">xlrd.biffh.</code><code class="descname">unpack_unicode_update_pos</code><span class="sig-paren">(</span><em>data</em>, <em>pos</em>, <em>lenlen=2</em>, <em>known_len=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.biffh.unpack_unicode_update_pos" title="Permalink to this definition">¶</a></dt>
<dd><p>Return (unicode_strg, updated value of pos)</p>
</dd></dl>
</div>
<div class="section" id="module-xlrd.book">
<span id="xlrd-book"></span><h2>xlrd.book<a class="headerlink" href="#module-xlrd.book" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="xlrd.book.Name">
<em class="property">class </em><code class="descclassname">xlrd.book.</code><code class="descname">Name</code><a class="headerlink" href="#xlrd.book.Name" title="Permalink to this definition">¶</a></dt>
<dd><p>Information relating to a named reference, formula, macro, etc.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Name information is <strong>not</strong> extracted from files older than
Excel 5.0 (<code class="docutils literal"><span class="pre">Book.biff_version</span> <span class="pre"><</span> <span class="pre">50</span></code>)</p>
</div>
<dl class="attribute">
<dt id="xlrd.book.Name.hidden">
<code class="descname">hidden</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Visible; 1 = Hidden</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.func">
<code class="descname">func</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.func" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Command macro; 1 = Function macro. Relevant only if macro == 1</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.vbasic">
<code class="descname">vbasic</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.vbasic" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Sheet macro; 1 = VisualBasic macro. Relevant only if macro == 1</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.macro">
<code class="descname">macro</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.macro" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Standard name; 1 = Macro name</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.complex">
<code class="descname">complex</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.complex" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Simple formula; 1 = Complex formula (array formula or user defined).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">No examples have been sighted.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.builtin">
<code class="descname">builtin</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.builtin" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = User-defined name; 1 = Built-in name</p>
<p>Common examples: <code class="docutils literal"><span class="pre">Print_Area</span></code>, <code class="docutils literal"><span class="pre">Print_Titles</span></code>; see OOo docs for
full list</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.funcgroup">
<code class="descname">funcgroup</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.funcgroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Function group. Relevant only if macro == 1; see OOo docs for values.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.binary">
<code class="descname">binary</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.binary" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Formula definition; 1 = Binary data</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">No examples have been sighted.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.name_index">
<code class="descname">name_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Name.name_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The index of this object in book.name_obj_list</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.raw_formula">
<code class="descname">raw_formula</code><em class="property"> = b''</em><a class="headerlink" href="#xlrd.book.Name.raw_formula" title="Permalink to this definition">¶</a></dt>
<dd><p>An 8-bit string.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.scope">
<code class="descname">scope</code><em class="property"> = -1</em><a class="headerlink" href="#xlrd.book.Name.scope" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt><code class="docutils literal"><span class="pre">-1</span></code>:</dt>
<dd>The name is global (visible in all calculation sheets).</dd>
<dt><code class="docutils literal"><span class="pre">-2</span></code>:</dt>
<dd>The name belongs to a macro sheet or VBA sheet.</dd>
<dt><code class="docutils literal"><span class="pre">-3</span></code>:</dt>
<dd>The name is invalid.</dd>
<dt><code class="docutils literal"><span class="pre">0</span> <span class="pre"><=</span> <span class="pre">scope</span> <span class="pre"><</span> <span class="pre">book.nsheets</span></code>:</dt>
<dd>The name is local to the sheet whose index is scope.</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Name.result">
<code class="descname">result</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.book.Name.result" title="Permalink to this definition">¶</a></dt>
<dd><p>The result of evaluating the formula, if any.
If no formula, or evaluation of the formula encountered problems,
the result is <code class="docutils literal"><span class="pre">None</span></code>. Otherwise the result is a single instance of the
<a class="reference internal" href="#xlrd.formula.Operand" title="xlrd.formula.Operand"><code class="xref py py-class docutils literal"><span class="pre">Operand</span></code></a> class.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Name.cell">
<code class="descname">cell</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Name.cell" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a convenience method for the frequent use case where the name
refers to a single cell.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">An instance of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> class.</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="#xlrd.biffh.XLRDError" title="xlrd.biffh.XLRDError"><strong>xlrd.biffh.XLRDError</strong></a> – The name is not a constant absolute reference
to a single cell.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Name.area2d">
<code class="descname">area2d</code><span class="sig-paren">(</span><em>clipped=True</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Name.area2d" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a convenience method for the use case where the name
refers to one rectangular area in one worksheet.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>clipped</strong> – If <code class="docutils literal"><span class="pre">True</span></code>, the default, the returned rectangle is clipped
to fit in <code class="docutils literal"><span class="pre">(0,</span> <span class="pre">sheet.nrows,</span> <span class="pre">0,</span> <span class="pre">sheet.ncols)</span></code>.
it is guaranteed that <code class="docutils literal"><span class="pre">0</span> <span class="pre"><=</span> <span class="pre">rowxlo</span> <span class="pre"><=</span> <span class="pre">rowxhi</span> <span class="pre"><=</span> <span class="pre">sheet.nrows</span></code> and
that the number of usable rows in the area (which may be zero) is
<code class="docutils literal"><span class="pre">rowxhi</span> <span class="pre">-</span> <span class="pre">rowxlo</span></code>; likewise for columns.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a tuple <code class="docutils literal"><span class="pre">(sheet_object,</span> <span class="pre">rowxlo,</span> <span class="pre">rowxhi,</span> <span class="pre">colxlo,</span> <span class="pre">colxhi)</span></code>.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="#xlrd.biffh.XLRDError" title="xlrd.biffh.XLRDError"><strong>xlrd.biffh.XLRDError</strong></a> – The name is not a constant absolute reference
to a single area in a single sheet.</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.book.Book">
<em class="property">class </em><code class="descclassname">xlrd.book.</code><code class="descname">Book</code><a class="headerlink" href="#xlrd.book.Book" title="Permalink to this definition">¶</a></dt>
<dd><p>Contents of a “workbook”.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You should not instantiate this class yourself. You use the <a class="reference internal" href="#xlrd.book.Book" title="xlrd.book.Book"><code class="xref py py-class docutils literal"><span class="pre">Book</span></code></a>
object that was returned when you called <a class="reference internal" href="#xlrd.open_workbook" title="xlrd.open_workbook"><code class="xref py py-func docutils literal"><span class="pre">open_workbook()</span></code></a>.</p>
</div>
<dl class="attribute">
<dt id="xlrd.book.Book.datemode">
<code class="descname">datemode</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Book.datemode" title="Permalink to this definition">¶</a></dt>
<dd><p>Which date system was in force when this file was last saved.</p>
<dl class="docutils">
<dt>0:</dt>
<dd>1900 system (the Excel for Windows default).</dd>
<dt>1:</dt>
<dd>1904 system (the Excel for Macintosh default).</dd>
</dl>
<p>Defaults to 0 in case it’s not specified in the file.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.biff_version">
<code class="descname">biff_version</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Book.biff_version" title="Permalink to this definition">¶</a></dt>
<dd><p>Version of BIFF (Binary Interchange File Format) used to create the file.
Latest is 8.0 (represented here as 80), introduced with Excel 97.
Earliest supported by this module: 2.0 (represented as 20).</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.codepage">
<code class="descname">codepage</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.book.Book.codepage" title="Permalink to this definition">¶</a></dt>
<dd><p>An integer denoting the character set used for strings in this file.
For BIFF 8 and later, this will be 1200, meaning Unicode;
more precisely, UTF_16_LE.
For earlier versions, this is used to derive the appropriate Python
encoding to be used to convert to Unicode.
Examples: <code class="docutils literal"><span class="pre">1252</span> <span class="pre">-></span> <span class="pre">'cp1252'</span></code>, <code class="docutils literal"><span class="pre">10000</span> <span class="pre">-></span> <span class="pre">'mac_roman'</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.encoding">
<code class="descname">encoding</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.book.Book.encoding" title="Permalink to this definition">¶</a></dt>
<dd><p>The encoding that was derived from the codepage.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.countries">
<code class="descname">countries</code><em class="property"> = (0, 0)</em><a class="headerlink" href="#xlrd.book.Book.countries" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple containing the telephone country code for:</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">[0]</span></code>:</dt>
<dd>the user-interface setting when the file was created.</dd>
<dt><code class="docutils literal"><span class="pre">[1]</span></code>:</dt>
<dd>the regional settings.</dd>
</dl>
<p>Example: <code class="docutils literal"><span class="pre">(1,</span> <span class="pre">61)</span></code> meaning <code class="docutils literal"><span class="pre">(USA,</span> <span class="pre">Australia)</span></code>.</p>
<p>This information may give a clue to the correct encoding for an
unknown codepage. For a long list of observed values, refer to the
OpenOffice.org documentation for the <code class="docutils literal"><span class="pre">COUNTRY</span></code> record.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.user_name">
<code class="descname">user_name</code><em class="property"> = ''</em><a class="headerlink" href="#xlrd.book.Book.user_name" title="Permalink to this definition">¶</a></dt>
<dd><p>What (if anything) is recorded as the name of the last user to
save the file.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.font_list">
<code class="descname">font_list</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.book.Book.font_list" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <a class="reference internal" href="#xlrd.formatting.Font" title="xlrd.formatting.Font"><code class="xref py py-class docutils literal"><span class="pre">Font</span></code></a> class instances,
each corresponding to a FONT record.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.format_list">
<code class="descname">format_list</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.book.Book.format_list" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <a class="reference internal" href="#xlrd.formatting.Format" title="xlrd.formatting.Format"><code class="xref py py-class docutils literal"><span class="pre">Format</span></code></a> objects, each corresponding to
a <code class="docutils literal"><span class="pre">FORMAT</span></code> record, in the order that they appear in the input file.
It does <em>not</em> contain builtin formats.</p>
<p>If you are creating an output file using (for example) <code class="xref py py-mod docutils literal"><span class="pre">xlwt</span></code>,
use this list.</p>
<p>The collection to be used for all visual rendering purposes is
<a class="reference internal" href="#xlrd.book.Book.format_map" title="xlrd.book.Book.format_map"><code class="xref py py-attr docutils literal"><span class="pre">format_map</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.format_map">
<code class="descname">format_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.book.Book.format_map" title="Permalink to this definition">¶</a></dt>
<dd><p>The mapping from <a class="reference internal" href="#xlrd.formatting.XF.format_key" title="xlrd.formatting.XF.format_key"><code class="xref py py-attr docutils literal"><span class="pre">format_key</span></code></a> to
<a class="reference internal" href="#xlrd.formatting.Format" title="xlrd.formatting.Format"><code class="xref py py-class docutils literal"><span class="pre">Format</span></code></a> object.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.load_time_stage_1">
<code class="descname">load_time_stage_1</code><em class="property"> = -1.0</em><a class="headerlink" href="#xlrd.book.Book.load_time_stage_1" title="Permalink to this definition">¶</a></dt>
<dd><p>Time in seconds to extract the XLS image as a contiguous string
(or mmap equivalent).</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.load_time_stage_2">
<code class="descname">load_time_stage_2</code><em class="property"> = -1.0</em><a class="headerlink" href="#xlrd.book.Book.load_time_stage_2" title="Permalink to this definition">¶</a></dt>
<dd><p>Time in seconds to parse the data from the contiguous string
(or mmap equivalent).</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.sheets">
<code class="descname">sheets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.sheets" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A list of all sheets in the book.</td>
</tr>
</tbody>
</table>
<p>All sheets not already loaded will be loaded.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.sheet_by_index">
<code class="descname">sheet_by_index</code><span class="sig-paren">(</span><em>sheetx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.sheet_by_index" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sheetx</strong> – Sheet index in <code class="docutils literal"><span class="pre">range(nsheets)</span></code></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A <a class="reference internal" href="#xlrd.sheet.Sheet" title="xlrd.sheet.Sheet"><code class="xref py py-class docutils literal"><span class="pre">Sheet</span></code></a>.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.sheet_by_name">
<code class="descname">sheet_by_name</code><span class="sig-paren">(</span><em>sheet_name</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.sheet_by_name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sheet_name</strong> – Name of the sheet required.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A <a class="reference internal" href="#xlrd.sheet.Sheet" title="xlrd.sheet.Sheet"><code class="xref py py-class docutils literal"><span class="pre">Sheet</span></code></a>.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.sheet_names">
<code class="descname">sheet_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.sheet_names" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A list of the names of all the worksheets in the workbook file.
This information is available even when no sheets have yet been
loaded.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.sheet_loaded">
<code class="descname">sheet_loaded</code><span class="sig-paren">(</span><em>sheet_name_or_index</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.sheet_loaded" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sheet_name_or_index</strong> – Name or index of sheet enquired upon</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">True</span></code> if sheet is loaded, <code class="docutils literal"><span class="pre">False</span></code> otherwise.</td>
</tr>
</tbody>
</table>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.1.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.unload_sheet">
<code class="descname">unload_sheet</code><span class="sig-paren">(</span><em>sheet_name_or_index</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.unload_sheet" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sheet_name_or_index</strong> – Name or index of sheet to be unloaded.</td>
</tr>
</tbody>
</table>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.1.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="xlrd.book.Book.release_resources">
<code class="descname">release_resources</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.Book.release_resources" title="Permalink to this definition">¶</a></dt>
<dd><p>This method has a dual purpose. You can call it to release
memory-consuming objects and (possibly) a memory-mapped file
(<code class="xref py py-class docutils literal"><span class="pre">mmap.mmap</span></code> object) when you have finished loading sheets in
<code class="docutils literal"><span class="pre">on_demand</span></code> mode, but still require the <a class="reference internal" href="#xlrd.book.Book" title="xlrd.book.Book"><code class="xref py py-class docutils literal"><span class="pre">Book</span></code></a> object to
examine the loaded sheets. It is also called automatically (a) when
<a class="reference internal" href="#xlrd.open_workbook" title="xlrd.open_workbook"><code class="xref py py-func docutils literal"><span class="pre">open_workbook()</span></code></a>
raises an exception and (b) if you are using a <code class="docutils literal"><span class="pre">with</span></code> statement, when
the <code class="docutils literal"><span class="pre">with</span></code> block is exited. Calling this method multiple times on the
same object has no ill effect.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.name_and_scope_map">
<code class="descname">name_and_scope_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.book.Book.name_and_scope_map" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>A mapping from <code class="docutils literal"><span class="pre">(lower_case_name,</span> <span class="pre">scope)</span></code> to a single <a class="reference internal" href="#xlrd.book.Name" title="xlrd.book.Name"><code class="xref py py-class docutils literal"><span class="pre">Name</span></code></a></dt>
<dd>object.</dd>
</dl>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.0.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.name_map">
<code class="descname">name_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.book.Book.name_map" title="Permalink to this definition">¶</a></dt>
<dd><p>A mapping from <cite>lower_case_name</cite> to a list of <a class="reference internal" href="#xlrd.book.Name" title="xlrd.book.Name"><code class="xref py py-class docutils literal"><span class="pre">Name</span></code></a> objects.
The list is sorted in scope order. Typically there will be one item
(of global scope) in the list.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.0.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.nsheets">
<code class="descname">nsheets</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.book.Book.nsheets" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of worksheets present in the workbook file.
This information is available even when no sheets have yet been loaded.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.name_obj_list">
<code class="descname">name_obj_list</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.book.Book.name_obj_list" title="Permalink to this definition">¶</a></dt>
<dd><p>List containing a <a class="reference internal" href="#xlrd.book.Name" title="xlrd.book.Name"><code class="xref py py-class docutils literal"><span class="pre">Name</span></code></a> object for each <code class="docutils literal"><span class="pre">NAME</span></code> record in the
workbook.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.0.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.colour_map">
<code class="descname">colour_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.book.Book.colour_map" title="Permalink to this definition">¶</a></dt>
<dd><p>This provides definitions for colour indexes. Please refer to
<a class="reference internal" href="formatting.html#palette"><span class="std std-ref">The Palette; Colour Indexes</span></a> for an explanation
of how colours are represented in Excel.</p>
<p>Colour indexes into the palette map into <code class="docutils literal"><span class="pre">(red,</span> <span class="pre">green,</span> <span class="pre">blue)</span></code> tuples.
“Magic” indexes e.g. <code class="docutils literal"><span class="pre">0x7FFF</span></code> map to <code class="docutils literal"><span class="pre">None</span></code>.</p>
<p><a class="reference internal" href="#xlrd.book.Book.colour_map" title="xlrd.book.Book.colour_map"><code class="xref py py-attr docutils literal"><span class="pre">colour_map</span></code></a> is what you need if you want to render cells on screen
or in a PDF file. If you are writing an output XLS file, use
<a class="reference internal" href="#xlrd.book.Book.palette_record" title="xlrd.book.Book.palette_record"><code class="xref py py-attr docutils literal"><span class="pre">palette_record</span></code></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Extracted only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.palette_record">
<code class="descname">palette_record</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.book.Book.palette_record" title="Permalink to this definition">¶</a></dt>
<dd><p>If the user has changed any of the colours in the standard palette, the
XLS file will contain a <code class="docutils literal"><span class="pre">PALETTE</span></code> record with 56 (16 for Excel 4.0 and
earlier) RGB values in it, and this list will be e.g.
<code class="docutils literal"><span class="pre">[(r0,</span> <span class="pre">b0,</span> <span class="pre">g0),</span> <span class="pre">...,</span> <span class="pre">(r55,</span> <span class="pre">b55,</span> <span class="pre">g55)]</span></code>.
Otherwise this list will be empty. This is what you need if you are
writing an output XLS file. If you want to render cells on screen or in a
PDF file, use <a class="reference internal" href="#xlrd.book.Book.colour_map" title="xlrd.book.Book.colour_map"><code class="xref py py-attr docutils literal"><span class="pre">colour_map</span></code></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Extracted only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.xf_list">
<code class="descname">xf_list</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.book.Book.xf_list" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <a class="reference internal" href="#xlrd.formatting.XF" title="xlrd.formatting.XF"><code class="xref py py-class docutils literal"><span class="pre">XF</span></code></a> class instances,
each corresponding to an <code class="docutils literal"><span class="pre">XF</span></code> record.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.book.Book.style_name_map">
<code class="descname">style_name_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.book.Book.style_name_map" title="Permalink to this definition">¶</a></dt>
<dd><p>This provides access via name to the extended format information for
both built-in styles and user-defined styles.</p>
<p>It maps <code class="docutils literal"><span class="pre">name</span></code> to <code class="docutils literal"><span class="pre">(built_in,</span> <span class="pre">xf_index)</span></code>, where
<code class="docutils literal"><span class="pre">name</span></code> is either the name of a user-defined style,
or the name of one of the built-in styles. Known built-in names are
Normal, RowLevel_1 to RowLevel_7,
ColLevel_1 to ColLevel_7, Comma, Currency, Percent, “Comma [0]”,
“Currency [0]”, Hyperlink, and “Followed Hyperlink”.</p>
<p><code class="docutils literal"><span class="pre">built_in</span></code> has the following meanings</p>
<dl class="docutils">
<dt>1:</dt>
<dd>built-in style</dd>
<dt>0:</dt>
<dd>user-defined</dd>
</dl>
<p><code class="docutils literal"><span class="pre">xf_index</span></code> is an index into <a class="reference internal" href="#xlrd.book.Book.xf_list" title="xlrd.book.Book.xf_list"><code class="xref py py-attr docutils literal"><span class="pre">Book.xf_list</span></code></a>.</p>
<p>References: OOo docs s6.99 (<code class="docutils literal"><span class="pre">STYLE</span></code> record); Excel UI Format/Style</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<p>Extracted only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.4.</span></p>
</div>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="xlrd.book.unpack_SST_table">
<code class="descclassname">xlrd.book.</code><code class="descname">unpack_SST_table</code><span class="sig-paren">(</span><em>datatab</em>, <em>nstrings</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.book.unpack_SST_table" title="Permalink to this definition">¶</a></dt>
<dd><p>Return list of strings</p>
</dd></dl>
</div>
<div class="section" id="module-xlrd.compdoc">
<span id="xlrd-compdoc"></span><h2>xlrd.compdoc<a class="headerlink" href="#module-xlrd.compdoc" title="Permalink to this headline">¶</a></h2>
<p>Implements the minimal functionality required
to extract a “Workbook” or “Book” stream (as one big string)
from an OLE2 Compound Document file.</p>
<dl class="data">
<dt id="xlrd.compdoc.SIGNATURE">
<code class="descclassname">xlrd.compdoc.</code><code class="descname">SIGNATURE</code><em class="property"> = b'\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1'</em><a class="headerlink" href="#xlrd.compdoc.SIGNATURE" title="Permalink to this definition">¶</a></dt>
<dd><p>Magic cookie that should appear in the first 8 bytes of the file.</p>
</dd></dl>
<dl class="class">
<dt id="xlrd.compdoc.CompDoc">
<em class="property">class </em><code class="descclassname">xlrd.compdoc.</code><code class="descname">CompDoc</code><span class="sig-paren">(</span><em>mem</em>, <em>logfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em>, <em>DEBUG=0</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.compdoc.CompDoc" title="Permalink to this definition">¶</a></dt>
<dd><p>Compound document handler.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mem</strong> – The raw contents of the file, as a string, or as an <code class="xref py py-class docutils literal"><span class="pre">mmap.mmap</span></code>
object. The only operation it needs to support is slicing.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="xlrd.compdoc.CompDoc.get_named_stream">
<code class="descname">get_named_stream</code><span class="sig-paren">(</span><em>qname</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.compdoc.CompDoc.get_named_stream" title="Permalink to this definition">¶</a></dt>
<dd><p>Interrogate the compound document’s directory; return the stream as a
string if found, otherwise return <code class="docutils literal"><span class="pre">None</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>qname</strong> – Name of the desired stream e.g. <code class="docutils literal"><span class="pre">u'Workbook'</span></code>.
Should be in Unicode or convertible thereto.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="xlrd.compdoc.CompDoc.locate_named_stream">
<code class="descname">locate_named_stream</code><span class="sig-paren">(</span><em>qname</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.compdoc.CompDoc.locate_named_stream" title="Permalink to this definition">¶</a></dt>
<dd><p>Interrogate the compound document’s directory.</p>
<p>If the named stream is not found, <code class="docutils literal"><span class="pre">(None,</span> <span class="pre">0,</span> <span class="pre">0)</span></code> will be returned.</p>
<p>If the named stream is found and is contiguous within the original
byte sequence (<code class="docutils literal"><span class="pre">mem</span></code>) used when the document was opened,
then <code class="docutils literal"><span class="pre">(mem,</span> <span class="pre">offset_to_start_of_stream,</span> <span class="pre">length_of_stream)</span></code> is returned.</p>
<p>Otherwise a new string is built from the fragments and
<code class="docutils literal"><span class="pre">(new_string,</span> <span class="pre">0,</span> <span class="pre">length_of_stream)</span></code> is returned.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>qname</strong> – Name of the desired stream e.g. <code class="docutils literal"><span class="pre">u'Workbook'</span></code>.
Should be in Unicode or convertible thereto.</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-xlrd.formatting">
<span id="xlrd-formatting"></span><h2>xlrd.formatting<a class="headerlink" href="#module-xlrd.formatting" title="Permalink to this headline">¶</a></h2>
<p>Module for formatting information.</p>
<dl class="function">
<dt id="xlrd.formatting.nearest_colour_index">
<code class="descclassname">xlrd.formatting.</code><code class="descname">nearest_colour_index</code><span class="sig-paren">(</span><em>colour_map</em>, <em>rgb</em>, <em>debug=0</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formatting.nearest_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>General purpose function. Uses Euclidean distance.
So far used only for pre-BIFF8 <code class="docutils literal"><span class="pre">WINDOW2</span></code> record.
Doesn’t have to be fast.
Doesn’t have to be fancy.</p>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.EqNeAttrs">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">EqNeAttrs</code><a class="headerlink" href="#xlrd.formatting.EqNeAttrs" title="Permalink to this definition">¶</a></dt>
<dd><p>This mixin class exists solely so that <a class="reference internal" href="#xlrd.formatting.Format" title="xlrd.formatting.Format"><code class="xref py py-class docutils literal"><span class="pre">Format</span></code></a>, <a class="reference internal" href="#xlrd.formatting.Font" title="xlrd.formatting.Font"><code class="xref py py-class docutils literal"><span class="pre">Font</span></code></a>, and
<a class="reference internal" href="#xlrd.formatting.XF" title="xlrd.formatting.XF"><code class="xref py py-class docutils literal"><span class="pre">XF</span></code></a> objects can be compared by value of their attributes.</p>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.Font">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">Font</code><a class="headerlink" href="#xlrd.formatting.Font" title="Permalink to this definition">¶</a></dt>
<dd><p>An Excel “font” contains the details of not only what is normally
considered a font, but also several other display attributes.
Items correspond to those in the Excel UI’s Format -> Cells -> Font tab.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.Font.bold">
<code class="descname">bold</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.bold" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Characters are bold. Redundant; see “weight” attribute.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.character_set">
<code class="descname">character_set</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.character_set" title="Permalink to this definition">¶</a></dt>
<dd><p>Values:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Latin</span>
<span class="mi">1</span> <span class="o">=</span> <span class="n">System</span> <span class="n">default</span>
<span class="mi">2</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">,</span>
<span class="mi">77</span> <span class="o">=</span> <span class="n">Apple</span> <span class="n">Roman</span><span class="p">,</span>
<span class="mi">128</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Japanese</span> <span class="n">Shift</span><span class="o">-</span><span class="n">JIS</span><span class="p">,</span>
<span class="mi">129</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Korean</span> <span class="p">(</span><span class="n">Hangul</span><span class="p">),</span>
<span class="mi">130</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Korean</span> <span class="p">(</span><span class="n">Johab</span><span class="p">),</span>
<span class="mi">134</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Chinese</span> <span class="n">Simplified</span> <span class="n">GBK</span><span class="p">,</span>
<span class="mi">136</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Chinese</span> <span class="n">Traditional</span> <span class="n">BIG5</span><span class="p">,</span>
<span class="mi">161</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Greek</span><span class="p">,</span>
<span class="mi">162</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Turkish</span><span class="p">,</span>
<span class="mi">163</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Vietnamese</span><span class="p">,</span>
<span class="mi">177</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Hebrew</span><span class="p">,</span>
<span class="mi">178</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Arabic</span><span class="p">,</span>
<span class="mi">186</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Baltic</span><span class="p">,</span>
<span class="mi">204</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Cyrillic</span><span class="p">,</span>
<span class="mi">222</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Thai</span><span class="p">,</span>
<span class="mi">238</span> <span class="o">=</span> <span class="n">ANSI</span> <span class="n">Latin</span> <span class="n">II</span> <span class="p">(</span><span class="n">Central</span> <span class="n">European</span><span class="p">),</span>
<span class="mi">255</span> <span class="o">=</span> <span class="n">OEM</span> <span class="n">Latin</span> <span class="n">I</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.colour_index">
<code class="descname">colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>An explanation of “colour index” is given in <a class="reference internal" href="formatting.html#palette"><span class="std std-ref">The Palette; Colour Indexes</span></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.escapement">
<code class="descname">escapement</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.escapement" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Superscript, 2 = Subscript.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.family">
<code class="descname">family</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.family" title="Permalink to this definition">¶</a></dt>
<dd><p>Values:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="o">=</span> <span class="kc">None</span> <span class="p">(</span><span class="n">unknown</span> <span class="ow">or</span> <span class="n">don</span><span class="s1">'t care)</span>
<span class="mi">1</span> <span class="o">=</span> <span class="n">Roman</span> <span class="p">(</span><span class="n">variable</span> <span class="n">width</span><span class="p">,</span> <span class="n">serifed</span><span class="p">)</span>
<span class="mi">2</span> <span class="o">=</span> <span class="n">Swiss</span> <span class="p">(</span><span class="n">variable</span> <span class="n">width</span><span class="p">,</span> <span class="n">sans</span><span class="o">-</span><span class="n">serifed</span><span class="p">)</span>
<span class="mi">3</span> <span class="o">=</span> <span class="n">Modern</span> <span class="p">(</span><span class="n">fixed</span> <span class="n">width</span><span class="p">,</span> <span class="n">serifed</span> <span class="ow">or</span> <span class="n">sans</span><span class="o">-</span><span class="n">serifed</span><span class="p">)</span>
<span class="mi">4</span> <span class="o">=</span> <span class="n">Script</span> <span class="p">(</span><span class="n">cursive</span><span class="p">)</span>
<span class="mi">5</span> <span class="o">=</span> <span class="n">Decorative</span> <span class="p">(</span><span class="n">specialised</span><span class="p">,</span> <span class="k">for</span> <span class="n">example</span> <span class="n">Old</span> <span class="n">English</span><span class="p">,</span> <span class="n">Fraktur</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.font_index">
<code class="descname">font_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.font_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The 0-based index used to refer to this Font() instance.
Note that index 4 is never used; xlrd supplies a dummy place-holder.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.height">
<code class="descname">height</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.height" title="Permalink to this definition">¶</a></dt>
<dd><p>Height of the font (in twips). A twip = 1/20 of a point.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.italic">
<code class="descname">italic</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.italic" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Characters are italic.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.name">
<code class="descname">name</code><em class="property"> = ''</em><a class="headerlink" href="#xlrd.formatting.Font.name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the font. Example: <code class="docutils literal"><span class="pre">u"Arial"</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.struck_out">
<code class="descname">struck_out</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.struck_out" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Characters are struck out.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.underline_type">
<code class="descname">underline_type</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.underline_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Values:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="o">=</span> <span class="kc">None</span>
<span class="mi">1</span> <span class="o">=</span> <span class="n">Single</span><span class="p">;</span> <span class="mh">0x21</span> <span class="p">(</span><span class="mi">33</span><span class="p">)</span> <span class="o">=</span> <span class="n">Single</span> <span class="n">accounting</span>
<span class="mi">2</span> <span class="o">=</span> <span class="n">Double</span><span class="p">;</span> <span class="mh">0x22</span> <span class="p">(</span><span class="mi">34</span><span class="p">)</span> <span class="o">=</span> <span class="n">Double</span> <span class="n">accounting</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.underlined">
<code class="descname">underlined</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.underlined" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Characters are underlined. Redundant; see
<a class="reference internal" href="#xlrd.formatting.Font.underline_type" title="xlrd.formatting.Font.underline_type"><code class="xref py py-attr docutils literal"><span class="pre">underline_type</span></code></a> attribute.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.weight">
<code class="descname">weight</code><em class="property"> = 400</em><a class="headerlink" href="#xlrd.formatting.Font.weight" title="Permalink to this definition">¶</a></dt>
<dd><p>Font weight (100-1000). Standard values are 400 for normal text
and 700 for bold text.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.outline">
<code class="descname">outline</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.outline" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Font is outline style (Macintosh only)</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Font.shadow">
<code class="descname">shadow</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Font.shadow" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Font is shadow style (Macintosh only)</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.Format">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">Format</code><span class="sig-paren">(</span><em>format_key</em>, <em>ty</em>, <em>format_str</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formatting.Format" title="Permalink to this definition">¶</a></dt>
<dd><p>“Number format” information from a <code class="docutils literal"><span class="pre">FORMAT</span></code> record.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.Format.format_key">
<code class="descname">format_key</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Format.format_key" title="Permalink to this definition">¶</a></dt>
<dd><p>The key into <a class="reference internal" href="#xlrd.book.Book.format_map" title="xlrd.book.Book.format_map"><code class="xref py py-attr docutils literal"><span class="pre">format_map</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Format.type">
<code class="descname">type</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.Format.type" title="Permalink to this definition">¶</a></dt>
<dd><p>A classification that has been inferred from the format string.
Currently, this is used only to distinguish between numbers and dates.
Values:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">FUN</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># unknown</span>
<span class="n">FDT</span> <span class="o">=</span> <span class="mi">1</span> <span class="c1"># date</span>
<span class="n">FNU</span> <span class="o">=</span> <span class="mi">2</span> <span class="c1"># number</span>
<span class="n">FGE</span> <span class="o">=</span> <span class="mi">3</span> <span class="c1"># general</span>
<span class="n">FTX</span> <span class="o">=</span> <span class="mi">4</span> <span class="c1"># text</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.Format.format_str">
<code class="descname">format_str</code><em class="property"> = ''</em><a class="headerlink" href="#xlrd.formatting.Format.format_str" title="Permalink to this definition">¶</a></dt>
<dd><p>The format string</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="xlrd.formatting.fmt_bracketed_sub">
<code class="descclassname">xlrd.formatting.</code><code class="descname">fmt_bracketed_sub</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formatting.fmt_bracketed_sub" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.</p>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.XFBorder">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">XFBorder</code><a class="headerlink" href="#xlrd.formatting.XFBorder" title="Permalink to this definition">¶</a></dt>
<dd><p>A collection of the border-related attributes of an <code class="docutils literal"><span class="pre">XF</span></code> record.
Items correspond to those in the Excel UI’s Format -> Cells -> Border tab.</p>
<p>An explanations of “colour index” is given in <a class="reference internal" href="formatting.html#palette"><span class="std std-ref">The Palette; Colour Indexes</span></a>.</p>
<p>There are five line style attributes; possible values and the
associated meanings are:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="o">=</span> <span class="n">No</span> <span class="n">line</span><span class="p">,</span>
<span class="mi">1</span> <span class="o">=</span> <span class="n">Thin</span><span class="p">,</span>
<span class="mi">2</span> <span class="o">=</span> <span class="n">Medium</span><span class="p">,</span>
<span class="mi">3</span> <span class="o">=</span> <span class="n">Dashed</span><span class="p">,</span>
<span class="mi">4</span> <span class="o">=</span> <span class="n">Dotted</span><span class="p">,</span>
<span class="mi">5</span> <span class="o">=</span> <span class="n">Thick</span><span class="p">,</span>
<span class="mi">6</span> <span class="o">=</span> <span class="n">Double</span><span class="p">,</span>
<span class="mi">7</span> <span class="o">=</span> <span class="n">Hair</span><span class="p">,</span>
<span class="mi">8</span> <span class="o">=</span> <span class="n">Medium</span> <span class="n">dashed</span><span class="p">,</span>
<span class="mi">9</span> <span class="o">=</span> <span class="n">Thin</span> <span class="n">dash</span><span class="o">-</span><span class="n">dotted</span><span class="p">,</span>
<span class="mi">10</span> <span class="o">=</span> <span class="n">Medium</span> <span class="n">dash</span><span class="o">-</span><span class="n">dotted</span><span class="p">,</span>
<span class="mi">11</span> <span class="o">=</span> <span class="n">Thin</span> <span class="n">dash</span><span class="o">-</span><span class="n">dot</span><span class="o">-</span><span class="n">dotted</span><span class="p">,</span>
<span class="mi">12</span> <span class="o">=</span> <span class="n">Medium</span> <span class="n">dash</span><span class="o">-</span><span class="n">dot</span><span class="o">-</span><span class="n">dotted</span><span class="p">,</span>
<span class="mi">13</span> <span class="o">=</span> <span class="n">Slanted</span> <span class="n">medium</span> <span class="n">dash</span><span class="o">-</span><span class="n">dotted</span><span class="o">.</span>
</pre></div>
</div>
<p>The line styles 8 to 13 appear in BIFF8 files (Excel 97 and later) only.
For pictures of the line styles, refer to OOo docs s3.10 (p22)
“Line Styles for Cell Borders (BIFF3-BIFF8)”.</p></p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.top_colour_index">
<code class="descname">top_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.top_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The colour index for the cell’s top line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.bottom_colour_index">
<code class="descname">bottom_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.bottom_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The colour index for the cell’s bottom line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.left_colour_index">
<code class="descname">left_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.left_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The colour index for the cell’s left line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.right_colour_index">
<code class="descname">right_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.right_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The colour index for the cell’s right line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.diag_colour_index">
<code class="descname">diag_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.diag_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The colour index for the cell’s diagonal lines, if any</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.top_line_style">
<code class="descname">top_line_style</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.top_line_style" title="Permalink to this definition">¶</a></dt>
<dd><p>The line style for the cell’s top line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.bottom_line_style">
<code class="descname">bottom_line_style</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.bottom_line_style" title="Permalink to this definition">¶</a></dt>
<dd><p>The line style for the cell’s bottom line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.left_line_style">
<code class="descname">left_line_style</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.left_line_style" title="Permalink to this definition">¶</a></dt>
<dd><p>The line style for the cell’s left line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.right_line_style">
<code class="descname">right_line_style</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.right_line_style" title="Permalink to this definition">¶</a></dt>
<dd><p>The line style for the cell’s right line</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.diag_line_style">
<code class="descname">diag_line_style</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.diag_line_style" title="Permalink to this definition">¶</a></dt>
<dd><p>The line style for the cell’s diagonal lines, if any</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.diag_down">
<code class="descname">diag_down</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.diag_down" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = draw a diagonal from top left to bottom right</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBorder.diag_up">
<code class="descname">diag_up</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBorder.diag_up" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = draw a diagonal from bottom left to top right</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.XFBackground">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">XFBackground</code><a class="headerlink" href="#xlrd.formatting.XFBackground" title="Permalink to this definition">¶</a></dt>
<dd><p>A collection of the background-related attributes of an <code class="docutils literal"><span class="pre">XF</span></code> record.
Items correspond to those in the Excel UI’s Format -> Cells -> Patterns tab.</p>
<p>An explanations of “colour index” is given in <a class="reference internal" href="formatting.html#palette"><span class="std std-ref">The Palette; Colour Indexes</span></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.XFBackground.fill_pattern">
<code class="descname">fill_pattern</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBackground.fill_pattern" title="Permalink to this definition">¶</a></dt>
<dd><p>See section 3.11 of the OOo docs.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBackground.background_colour_index">
<code class="descname">background_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBackground.background_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>See section 3.11 of the OOo docs.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFBackground.pattern_colour_index">
<code class="descname">pattern_colour_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFBackground.pattern_colour_index" title="Permalink to this definition">¶</a></dt>
<dd><p>See section 3.11 of the OOo docs.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.XFAlignment">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">XFAlignment</code><a class="headerlink" href="#xlrd.formatting.XFAlignment" title="Permalink to this definition">¶</a></dt>
<dd><p>A collection of the alignment and similar attributes of an <code class="docutils literal"><span class="pre">XF</span></code> record.
Items correspond to those in the Excel UI’s Format -> Cells -> Alignment tab.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.hor_align">
<code class="descname">hor_align</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.hor_align" title="Permalink to this definition">¶</a></dt>
<dd><p>Values: section 6.115 (p 214) of OOo docs</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.vert_align">
<code class="descname">vert_align</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.vert_align" title="Permalink to this definition">¶</a></dt>
<dd><p>Values: section 6.115 (p 215) of OOo docs</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.rotation">
<code class="descname">rotation</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.rotation" title="Permalink to this definition">¶</a></dt>
<dd><p>Values: section 6.115 (p 215) of OOo docs.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">file versions BIFF7 and earlier use the documented
<code class="xref py py-attr docutils literal"><span class="pre">orientation</span></code> attribute; this will be mapped (without loss)
into <a class="reference internal" href="#xlrd.formatting.XFAlignment.rotation" title="xlrd.formatting.XFAlignment.rotation"><code class="xref py py-attr docutils literal"><span class="pre">rotation</span></code></a>.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.text_wrapped">
<code class="descname">text_wrapped</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.text_wrapped" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = text is wrapped at right margin</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.indent_level">
<code class="descname">indent_level</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.indent_level" title="Permalink to this definition">¶</a></dt>
<dd><p>A number in <code class="docutils literal"><span class="pre">range(15)</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.shrink_to_fit">
<code class="descname">shrink_to_fit</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.shrink_to_fit" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = shrink font size to fit text into cell.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFAlignment.text_direction">
<code class="descname">text_direction</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFAlignment.text_direction" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = according to context; 1 = left-to-right; 2 = right-to-left</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.XFProtection">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">XFProtection</code><a class="headerlink" href="#xlrd.formatting.XFProtection" title="Permalink to this definition">¶</a></dt>
<dd><p>A collection of the protection-related attributes of an <code class="docutils literal"><span class="pre">XF</span></code> record.
Items correspond to those in the Excel UI’s Format -> Cells -> Protection tab.
Note the OOo docs include the “cell or style” bit in this bundle of
attributes. This is incorrect; the bit is used in determining which bundles
to use.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.XFProtection.cell_locked">
<code class="descname">cell_locked</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFProtection.cell_locked" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Cell is prevented from being changed, moved, resized, or deleted
(only if the sheet is protected).</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XFProtection.formula_hidden">
<code class="descname">formula_hidden</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XFProtection.formula_hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Hide formula so that it doesn’t appear in the formula bar when
the cell is selected (only if the sheet is protected).</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.formatting.XF">
<em class="property">class </em><code class="descclassname">xlrd.formatting.</code><code class="descname">XF</code><a class="headerlink" href="#xlrd.formatting.XF" title="Permalink to this definition">¶</a></dt>
<dd><p>eXtended Formatting information for cells, rows, columns and styles.</p>
<p>Each of the 6 flags below describes the validity of
a specific group of attributes.</p>
<p>In cell XFs:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">flag==0</span></code> means the attributes of the parent style <code class="docutils literal"><span class="pre">XF</span></code> are
used, (but only if the attributes are valid there);</li>
<li><code class="docutils literal"><span class="pre">flag==1</span></code> means the attributes of this <code class="docutils literal"><span class="pre">XF</span></code> are used.</li>
</ul>
<p>In style XFs:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">flag==0</span></code> means the attribute setting is valid;</li>
<li><code class="docutils literal"><span class="pre">flag==1</span></code> means the attribute should be ignored.</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the API provides both “raw” XFs and “computed” XFs. In the latter case,
cell XFs have had the above inheritance mechanism applied.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.formatting.XF.is_style">
<code class="descname">is_style</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XF.is_style" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = cell XF, 1 = style XF</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.parent_style_index">
<code class="descname">parent_style_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XF.parent_style_index" title="Permalink to this definition">¶</a></dt>
<dd><p>cell XF: Index into Book.xf_list of this XF’s style XF</p>
<p>style XF: 0xFFF</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.xf_index">
<code class="descname">xf_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XF.xf_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Index into <a class="reference internal" href="#xlrd.book.Book.xf_list" title="xlrd.book.Book.xf_list"><code class="xref py py-attr docutils literal"><span class="pre">xf_list</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.font_index">
<code class="descname">font_index</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XF.font_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Index into <a class="reference internal" href="#xlrd.book.Book.font_list" title="xlrd.book.Book.font_list"><code class="xref py py-attr docutils literal"><span class="pre">font_list</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.format_key">
<code class="descname">format_key</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formatting.XF.format_key" title="Permalink to this definition">¶</a></dt>
<dd><p>Key into <a class="reference internal" href="#xlrd.book.Book.format_map" title="xlrd.book.Book.format_map"><code class="xref py py-attr docutils literal"><span class="pre">format_map</span></code></a></p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">OOo docs on the XF record call this “Index to FORMAT record”.
It is not an index in the Python sense. It is a key to a map.
It is true <em>only</em> for Excel 4.0 and earlier files
that the key into format_map from an XF instance
is the same as the index into format_list, and <em>only</em>
if the index is less than 164.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.protection">
<code class="descname">protection</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.formatting.XF.protection" title="Permalink to this definition">¶</a></dt>
<dd><p>An instance of an <a class="reference internal" href="#xlrd.formatting.XFProtection" title="xlrd.formatting.XFProtection"><code class="xref py py-class docutils literal"><span class="pre">XFProtection</span></code></a> object.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.background">
<code class="descname">background</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.formatting.XF.background" title="Permalink to this definition">¶</a></dt>
<dd><p>An instance of an <a class="reference internal" href="#xlrd.formatting.XFBackground" title="xlrd.formatting.XFBackground"><code class="xref py py-class docutils literal"><span class="pre">XFBackground</span></code></a> object.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.alignment">
<code class="descname">alignment</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.formatting.XF.alignment" title="Permalink to this definition">¶</a></dt>
<dd><p>An instance of an <a class="reference internal" href="#xlrd.formatting.XFAlignment" title="xlrd.formatting.XFAlignment"><code class="xref py py-class docutils literal"><span class="pre">XFAlignment</span></code></a> object.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formatting.XF.border">
<code class="descname">border</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.formatting.XF.border" title="Permalink to this definition">¶</a></dt>
<dd><p>An instance of an <a class="reference internal" href="#xlrd.formatting.XFBorder" title="xlrd.formatting.XFBorder"><code class="xref py py-class docutils literal"><span class="pre">XFBorder</span></code></a> object.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-xlrd.formula">
<span id="xlrd-formula"></span><h2>xlrd.formula<a class="headerlink" href="#module-xlrd.formula" title="Permalink to this headline">¶</a></h2>
<p>Module for parsing/evaluating Microsoft Excel formulas.</p>
<dl class="class">
<dt id="xlrd.formula.Operand">
<em class="property">class </em><code class="descclassname">xlrd.formula.</code><code class="descname">Operand</code><span class="sig-paren">(</span><em>akind=None</em>, <em>avalue=None</em>, <em>arank=0</em>, <em>atext='?'</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.Operand" title="Permalink to this definition">¶</a></dt>
<dd><p>Used in evaluating formulas.
The following table describes the kinds and how their values
are represented.</p>
<table border="1" cellpadding="7">
<tr>
<th>Kind symbol</th>
<th>Kind number</th>
<th>Value representation</th>
</tr>
<tr>
<td>oBOOL</td>
<td align="center">3</td>
<td>integer: 0 => False; 1 => True</td>
</tr>
<tr>
<td>oERR</td>
<td align="center">4</td>
<td>None, or an int error code (same as XL_CELL_ERROR in the Cell class).
</td>
</tr>
<tr>
<td>oMSNG</td>
<td align="center">5</td>
<td>Used by Excel as a placeholder for a missing (not supplied) function
argument. Should *not* appear as a final formula result. Value is None.</td>
</tr>
<tr>
<td>oNUM</td>
<td align="center">2</td>
<td>A float. Note that there is no way of distinguishing dates.</td>
</tr>
<tr>
<td>oREF</td>
<td align="center">-1</td>
<td>The value is either None or a non-empty list of
absolute Ref3D instances.<br>
</td>
</tr>
<tr>
<td>oREL</td>
<td align="center">-2</td>
<td>The value is None or a non-empty list of
fully or partially relative Ref3D instances.
</td>
</tr>
<tr>
<td>oSTRG</td>
<td align="center">1</td>
<td>A Unicode string.</td>
</tr>
<tr>
<td>oUNK</td>
<td align="center">0</td>
<td>The kind is unknown or ambiguous. The value is None</td>
</tr>
</table><dl class="attribute">
<dt id="xlrd.formula.Operand.kind">
<code class="descname">kind</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.formula.Operand.kind" title="Permalink to this definition">¶</a></dt>
<dd><p>oUNK means that the kind of operand is not known unambiguously.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formula.Operand.value">
<code class="descname">value</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.formula.Operand.value" title="Permalink to this definition">¶</a></dt>
<dd><p>None means that the actual value of the operand is a variable
(depends on cell data), not a constant.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.formula.Operand.text">
<code class="descname">text</code><em class="property"> = '?'</em><a class="headerlink" href="#xlrd.formula.Operand.text" title="Permalink to this definition">¶</a></dt>
<dd><p>The reconstituted text of the original formula. Function names will be
in English irrespective of the original language, which doesn’t seem
to be recorded anywhere. The separator is “,”, not “;” or whatever else
might be more appropriate for the end-user’s locale; patches welcome.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.formula.Ref3D">
<em class="property">class </em><code class="descclassname">xlrd.formula.</code><code class="descname">Ref3D</code><span class="sig-paren">(</span><em>atuple</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.Ref3D" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents an absolute or relative 3-dimensional reference to a box
of one or more cells.</p>
<p>The <code class="docutils literal"><span class="pre">coords</span></code> attribute is a tuple of the form:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">shtxlo</span><span class="p">,</span> <span class="n">shtxhi</span><span class="p">,</span> <span class="n">rowxlo</span><span class="p">,</span> <span class="n">rowxhi</span><span class="p">,</span> <span class="n">colxlo</span><span class="p">,</span> <span class="n">colxhi</span><span class="p">)</span>
</pre></div>
</div>
<p>where <code class="docutils literal"><span class="pre">0</span> <span class="pre"><=</span> <span class="pre">thingxlo</span> <span class="pre"><=</span> <span class="pre">thingx</span> <span class="pre"><</span> <span class="pre">thingxhi</span></code>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">It is quite possible to have <code class="docutils literal"><span class="pre">thingx</span> <span class="pre">></span> <span class="pre">nthings</span></code>; for example
<code class="docutils literal"><span class="pre">Print_Titles</span></code> could have <code class="docutils literal"><span class="pre">colxhi</span> <span class="pre">==</span> <span class="pre">256</span></code> and/or <code class="docutils literal"><span class="pre">rowxhi</span> <span class="pre">==</span> <span class="pre">65536</span></code>
irrespective of how many columns/rows are actually used in the worksheet.
The caller will need to decide how to handle this situation.
Keyword: <code class="xref py py-class docutils literal"><span class="pre">IndexError</span></code> :-)</p>
</div>
<p>The components of the coords attribute are also available as individual
attributes: <code class="docutils literal"><span class="pre">shtxlo</span></code>, <code class="docutils literal"><span class="pre">shtxhi</span></code>, <code class="docutils literal"><span class="pre">rowxlo</span></code>, <code class="docutils literal"><span class="pre">rowxhi</span></code>, <code class="docutils literal"><span class="pre">colxlo</span></code>, and
<code class="docutils literal"><span class="pre">colxhi</span></code>.</p>
<p>The <code class="docutils literal"><span class="pre">relflags</span></code> attribute is a 6-tuple of flags which indicate whether
the corresponding (sheet|row|col)(lo|hi) is relative (1) or absolute (0).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">There is necessarily no information available as to what cell(s)
the reference could possibly be relative to. The caller must decide what
if any use to make of <code class="docutils literal"><span class="pre">oREL</span></code> operands.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.0.</span></p>
</div>
</dd></dl>
<dl class="function">
<dt id="xlrd.formula.cellname">
<code class="descclassname">xlrd.formula.</code><code class="descname">cellname</code><span class="sig-paren">(</span><em>rowx</em>, <em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.cellname" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function: <code class="docutils literal"><span class="pre">(5,</span> <span class="pre">7)</span></code> => <code class="docutils literal"><span class="pre">'H6'</span></code></p>
</dd></dl>
<dl class="function">
<dt id="xlrd.formula.cellnameabs">
<code class="descclassname">xlrd.formula.</code><code class="descname">cellnameabs</code><span class="sig-paren">(</span><em>rowx</em>, <em>colx</em>, <em>r1c1=0</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.cellnameabs" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function: <code class="docutils literal"><span class="pre">(5,</span> <span class="pre">7)</span></code> => <code class="docutils literal"><span class="pre">'$H$6'</span></code></p>
</dd></dl>
<dl class="function">
<dt id="xlrd.formula.colname">
<code class="descclassname">xlrd.formula.</code><code class="descname">colname</code><span class="sig-paren">(</span><em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.colname" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function: <code class="docutils literal"><span class="pre">7</span></code> => <code class="docutils literal"><span class="pre">'H'</span></code>, <code class="docutils literal"><span class="pre">27</span></code> => <code class="docutils literal"><span class="pre">'AB'</span></code></p>
</dd></dl>
<dl class="function">
<dt id="xlrd.formula.rangename3d">
<code class="descclassname">xlrd.formula.</code><code class="descname">rangename3d</code><span class="sig-paren">(</span><em>book</em>, <em>ref3d</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.rangename3d" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function:
<code class="docutils literal"><span class="pre">Ref3D(1,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">20,</span> <span class="pre">7,</span> <span class="pre">10)</span></code> =>
<code class="docutils literal"><span class="pre">'Sheet2:Sheet3!$H$6:$J$20'</span></code>
(assuming Excel’s default sheetnames)</p>
</dd></dl>
<dl class="function">
<dt id="xlrd.formula.rangename3drel">
<code class="descclassname">xlrd.formula.</code><code class="descname">rangename3drel</code><span class="sig-paren">(</span><em>book</em>, <em>ref3d</em>, <em>browx=None</em>, <em>bcolx=None</em>, <em>r1c1=0</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.formula.rangename3drel" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function:
<code class="docutils literal"><span class="pre">Ref3D(coords=(0,</span> <span class="pre">1,</span> <span class="pre">-32,</span> <span class="pre">-22,</span> <span class="pre">-13,</span> <span class="pre">13),</span> <span class="pre">relflags=(0,</span> <span class="pre">0,</span> <span class="pre">1,</span> <span class="pre">1,</span> <span class="pre">1,</span> <span class="pre">1))</span></code></p>
<p>In R1C1 mode => <code class="docutils literal"><span class="pre">'Sheet1!R[-32]C[-13]:R[-23]C[12]'</span></code></p>
<p>In A1 mode => depends on base cell <code class="docutils literal"><span class="pre">(browx,</span> <span class="pre">bcolx)</span></code></p>
</dd></dl>
</div>
<div class="section" id="xlrd-sheet">
<h2>xlrd.sheet<a class="headerlink" href="#xlrd-sheet" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="xlrd.sheet.Sheet">
<em class="property">class </em><code class="descclassname">xlrd.sheet.</code><code class="descname">Sheet</code><span class="sig-paren">(</span><em>book</em>, <em>position</em>, <em>name</em>, <em>number</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet" title="Permalink to this definition">¶</a></dt>
<dd><p>Contains the data for one worksheet.</p>
<p>In the cell access functions, <code class="docutils literal"><span class="pre">rowx</span></code> is a row index, counting from
zero, and <code class="docutils literal"><span class="pre">colx</span></code> is a column index, counting from zero.
Negative values for row/column indexes and slice positions are supported in
the expected fashion.</p>
<p>For information about cell types and cell values, refer to the documentation
of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> class.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You don’t instantiate this class yourself. You access <a class="reference internal" href="#xlrd.sheet.Sheet" title="xlrd.sheet.Sheet"><code class="xref py py-class docutils literal"><span class="pre">Sheet</span></code></a>
objects via the <a class="reference internal" href="#xlrd.book.Book" title="xlrd.book.Book"><code class="xref py py-class docutils literal"><span class="pre">Book</span></code></a> object that
was returned when you called <a class="reference internal" href="#xlrd.open_workbook" title="xlrd.open_workbook"><code class="xref py py-func docutils literal"><span class="pre">xlrd.open_workbook()</span></code></a>.</p>
</div>
<dl class="method">
<dt id="xlrd.sheet.Sheet.col">
<code class="descname">col</code><span class="sig-paren">(</span><em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.col" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a sequence of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> objects in the given column.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.gcw">
<code class="descname">gcw</code><a class="headerlink" href="#xlrd.sheet.Sheet.gcw" title="Permalink to this definition">¶</a></dt>
<dd><p>A 256-element tuple corresponding to the contents of the GCW record for
this sheet. If no such record, treat as all bits zero.
Applies to BIFF4-7 only. See docs of the <a class="reference internal" href="#xlrd.sheet.Colinfo" title="xlrd.sheet.Colinfo"><code class="xref py py-class docutils literal"><span class="pre">Colinfo</span></code></a> class for
discussion.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.vert_split_pos">
<code class="descname">vert_split_pos</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.vert_split_pos" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of columns in left pane (frozen panes; for split panes, see
comments in code)</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.horz_split_pos">
<code class="descname">horz_split_pos</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.horz_split_pos" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of rows in top pane (frozen panes; for split panes, see comments
in code)</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.horz_split_first_visible">
<code class="descname">horz_split_first_visible</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.horz_split_first_visible" title="Permalink to this definition">¶</a></dt>
<dd><p>Index of first visible row in bottom frozen/split pane</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.vert_split_first_visible">
<code class="descname">vert_split_first_visible</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.vert_split_first_visible" title="Permalink to this definition">¶</a></dt>
<dd><p>Index of first visible column in right frozen/split pane</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.split_active_pane">
<code class="descname">split_active_pane</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.split_active_pane" title="Permalink to this definition">¶</a></dt>
<dd><p>Frozen panes: ignore it. Split panes: explanation and diagrams in
OOo docs.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.has_pane_record">
<code class="descname">has_pane_record</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.has_pane_record" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean specifying if a <code class="docutils literal"><span class="pre">PANE</span></code> record was present, ignore unless you’re
<code class="docutils literal"><span class="pre">xlutils.copy</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.book">
<code class="descname">book</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.book" title="Permalink to this definition">¶</a></dt>
<dd><p>A reference to the <a class="reference internal" href="#xlrd.book.Book" title="xlrd.book.Book"><code class="xref py py-class docutils literal"><span class="pre">Book</span></code></a> object to which this sheet
belongs.</p>
<p>Example usage: <code class="docutils literal"><span class="pre">some_sheet.book.datemode</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.name">
<code class="descname">name</code><em class="property"> = ''</em><a class="headerlink" href="#xlrd.sheet.Sheet.name" title="Permalink to this definition">¶</a></dt>
<dd><p>Name of sheet.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.nrows">
<code class="descname">nrows</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.nrows" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of rows in sheet. A row index is in <code class="docutils literal"><span class="pre">range(thesheet.nrows)</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.ncols">
<code class="descname">ncols</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.ncols" title="Permalink to this definition">¶</a></dt>
<dd><p>Nominal number of columns in sheet. It is one more than the maximum
column index found, ignoring trailing empty cells.
See also the <code class="docutils literal"><span class="pre">ragged_rows</span></code> parameter to <a class="reference internal" href="#xlrd.open_workbook" title="xlrd.open_workbook"><code class="xref py py-func docutils literal"><span class="pre">open_workbook()</span></code></a>
and <a class="reference internal" href="#xlrd.sheet.Sheet.row_len" title="xlrd.sheet.Sheet.row_len"><code class="xref py py-meth docutils literal"><span class="pre">row_len()</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.defcolwidth">
<code class="descname">defcolwidth</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.defcolwidth" title="Permalink to this definition">¶</a></dt>
<dd><p>Default column width from <code class="docutils literal"><span class="pre">DEFCOLWIDTH</span></code> record, else <code class="docutils literal"><span class="pre">None</span></code>.
From the OOo docs:</p>
<blockquote>
<div>Column width in characters, using the width of the zero character
from default font (first FONT record in the file). Excel adds some
extra space to the default width, depending on the default font and
default font size. The algorithm how to exactly calculate the resulting
column width is not known.
Example: The default width of 8 set in this record results in a column
width of 8.43 using Arial font with a size of 10 points.</div></blockquote>
<p>For the default hierarchy, refer to the <a class="reference internal" href="#xlrd.sheet.Colinfo" title="xlrd.sheet.Colinfo"><code class="xref py py-class docutils literal"><span class="pre">Colinfo</span></code></a> class.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.standardwidth">
<code class="descname">standardwidth</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.standardwidth" title="Permalink to this definition">¶</a></dt>
<dd><p>Default column width from <code class="docutils literal"><span class="pre">STANDARDWIDTH</span></code> record, else <code class="docutils literal"><span class="pre">None</span></code>.</p>
<p>From the OOo docs:</p>
<blockquote>
<div>Default width of the columns in 1/256 of the width of the zero
character, using default font (first FONT record in the file).</div></blockquote>
<p>For the default hierarchy, refer to the <a class="reference internal" href="#xlrd.sheet.Colinfo" title="xlrd.sheet.Colinfo"><code class="xref py py-class docutils literal"><span class="pre">Colinfo</span></code></a> class.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.default_row_height">
<code class="descname">default_row_height</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.default_row_height" title="Permalink to this definition">¶</a></dt>
<dd><p>Default value to be used for a row if there is
no <code class="docutils literal"><span class="pre">ROW</span></code> record for that row.
From the <em>optional</em> <code class="docutils literal"><span class="pre">DEFAULTROWHEIGHT</span></code> record.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.default_row_height_mismatch">
<code class="descname">default_row_height_mismatch</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.default_row_height_mismatch" title="Permalink to this definition">¶</a></dt>
<dd><p>Default value to be used for a row if there is
no <code class="docutils literal"><span class="pre">ROW</span></code> record for that row.
From the <em>optional</em> <code class="docutils literal"><span class="pre">DEFAULTROWHEIGHT</span></code> record.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.default_row_hidden">
<code class="descname">default_row_hidden</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.default_row_hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>Default value to be used for a row if there is
no <code class="docutils literal"><span class="pre">ROW</span></code> record for that row.
From the <em>optional</em> <code class="docutils literal"><span class="pre">DEFAULTROWHEIGHT</span></code> record.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.default_additional_space_above">
<code class="descname">default_additional_space_above</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.default_additional_space_above" title="Permalink to this definition">¶</a></dt>
<dd><p>Default value to be used for a row if there is
no <code class="docutils literal"><span class="pre">ROW</span></code> record for that row.
From the <em>optional</em> <code class="docutils literal"><span class="pre">DEFAULTROWHEIGHT</span></code> record.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.default_additional_space_below">
<code class="descname">default_additional_space_below</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Sheet.default_additional_space_below" title="Permalink to this definition">¶</a></dt>
<dd><p>Default value to be used for a row if there is
no <code class="docutils literal"><span class="pre">ROW</span></code> record for that row.
From the <em>optional</em> <code class="docutils literal"><span class="pre">DEFAULTROWHEIGHT</span></code> record.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.colinfo_map">
<code class="descname">colinfo_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.sheet.Sheet.colinfo_map" title="Permalink to this definition">¶</a></dt>
<dd><p>The map from a column index to a <a class="reference internal" href="#xlrd.sheet.Colinfo" title="xlrd.sheet.Colinfo"><code class="xref py py-class docutils literal"><span class="pre">Colinfo</span></code></a> object. Often there is
an entry in <code class="docutils literal"><span class="pre">COLINFO</span></code> records for all column indexes in <code class="docutils literal"><span class="pre">range(257)</span></code>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">xlrd ignores the entry for the non-existent
257th column.</p>
</div>
<p>On the other hand, there may be no entry for unused columns.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<p>Populated only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.rowinfo_map">
<code class="descname">rowinfo_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.sheet.Sheet.rowinfo_map" title="Permalink to this definition">¶</a></dt>
<dd><p>The map from a row index to a <a class="reference internal" href="#xlrd.sheet.Rowinfo" title="xlrd.sheet.Rowinfo"><code class="xref py py-class docutils literal"><span class="pre">Rowinfo</span></code></a> object.</p>
<dl class="docutils">
<dt>..note::</dt>
<dd>It is possible to have missing entries – at least one source of
XLS files doesn’t bother writing <code class="docutils literal"><span class="pre">ROW</span></code> records.</dd>
</dl>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<p>Populated only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.col_label_ranges">
<code class="descname">col_label_ranges</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.sheet.Sheet.col_label_ranges" title="Permalink to this definition">¶</a></dt>
<dd><p>List of address ranges of cells containing column labels.
These are set up in Excel by Insert > Name > Labels > Columns.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.0.</span></p>
</div>
<p>How to deconstruct the list:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">crange</span> <span class="ow">in</span> <span class="n">thesheet</span><span class="o">.</span><span class="n">col_label_ranges</span><span class="p">:</span>
<span class="n">rlo</span><span class="p">,</span> <span class="n">rhi</span><span class="p">,</span> <span class="n">clo</span><span class="p">,</span> <span class="n">chi</span> <span class="o">=</span> <span class="n">crange</span>
<span class="k">for</span> <span class="n">rx</span> <span class="ow">in</span> <span class="nb">xrange</span><span class="p">(</span><span class="n">rlo</span><span class="p">,</span> <span class="n">rhi</span><span class="p">):</span>
<span class="k">for</span> <span class="n">cx</span> <span class="ow">in</span> <span class="nb">xrange</span><span class="p">(</span><span class="n">clo</span><span class="p">,</span> <span class="n">chi</span><span class="p">):</span>
<span class="k">print</span> <span class="s2">"Column label at (rowx=</span><span class="si">%d</span><span class="s2">, colx=</span><span class="si">%d</span><span class="s2">) is </span><span class="si">%r</span><span class="s2">"</span> \
<span class="p">(</span><span class="n">rx</span><span class="p">,</span> <span class="n">cx</span><span class="p">,</span> <span class="n">thesheet</span><span class="o">.</span><span class="n">cell_value</span><span class="p">(</span><span class="n">rx</span><span class="p">,</span> <span class="n">cx</span><span class="p">))</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.row_label_ranges">
<code class="descname">row_label_ranges</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.sheet.Sheet.row_label_ranges" title="Permalink to this definition">¶</a></dt>
<dd><p>List of address ranges of cells containing row labels.
For more details, see <a class="reference internal" href="#xlrd.sheet.Sheet.col_label_ranges" title="xlrd.sheet.Sheet.col_label_ranges"><code class="xref py py-attr docutils literal"><span class="pre">col_label_ranges</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.0.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.merged_cells">
<code class="descname">merged_cells</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.sheet.Sheet.merged_cells" title="Permalink to this definition">¶</a></dt>
<dd><p>List of address ranges of cells which have been merged.
These are set up in Excel by Format > Cells > Alignment, then ticking
the “Merge cells” box.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The upper limits are exclusive: i.e. <code class="docutils literal"><span class="pre">[2,</span> <span class="pre">3,</span> <span class="pre">7,</span> <span class="pre">9]</span></code> only
spans two cells.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Extracted only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<p>How to deconstruct the list:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">crange</span> <span class="ow">in</span> <span class="n">thesheet</span><span class="o">.</span><span class="n">merged_cells</span><span class="p">:</span>
<span class="n">rlo</span><span class="p">,</span> <span class="n">rhi</span><span class="p">,</span> <span class="n">clo</span><span class="p">,</span> <span class="n">chi</span> <span class="o">=</span> <span class="n">crange</span>
<span class="k">for</span> <span class="n">rowx</span> <span class="ow">in</span> <span class="nb">xrange</span><span class="p">(</span><span class="n">rlo</span><span class="p">,</span> <span class="n">rhi</span><span class="p">):</span>
<span class="k">for</span> <span class="n">colx</span> <span class="ow">in</span> <span class="nb">xrange</span><span class="p">(</span><span class="n">clo</span><span class="p">,</span> <span class="n">chi</span><span class="p">):</span>
<span class="c1"># cell (rlo, clo) (the top left one) will carry the data</span>
<span class="c1"># and formatting info; the remainder will be recorded as</span>
<span class="c1"># blank cells, but a renderer will apply the formatting info</span>
<span class="c1"># for the top left cell (e.g. border, pattern) to all cells in</span>
<span class="c1"># the range.</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.rich_text_runlist_map">
<code class="descname">rich_text_runlist_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.sheet.Sheet.rich_text_runlist_map" title="Permalink to this definition">¶</a></dt>
<dd><p>Mapping of <code class="docutils literal"><span class="pre">(rowx,</span> <span class="pre">colx)</span></code> to list of <code class="docutils literal"><span class="pre">(offset,</span> <span class="pre">font_index)</span></code> tuples.
The offset defines where in the string the font begins to be used.
Offsets are expected to be in ascending order.
If the first offset is not zero, the meaning is that the cell’s <code class="docutils literal"><span class="pre">XF</span></code>’s
font should be used from offset 0.</p>
<p>This is a sparse mapping. There is no entry for cells that are not
formatted with rich text.</p>
<p>How to use:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">runlist</span> <span class="o">=</span> <span class="n">thesheet</span><span class="o">.</span><span class="n">rich_text_runlist_map</span><span class="o">.</span><span class="n">get</span><span class="p">((</span><span class="n">rowx</span><span class="p">,</span> <span class="n">colx</span><span class="p">))</span>
<span class="k">if</span> <span class="n">runlist</span><span class="p">:</span>
<span class="k">for</span> <span class="n">offset</span><span class="p">,</span> <span class="n">font_index</span> <span class="ow">in</span> <span class="n">runlist</span><span class="p">:</span>
<span class="c1"># do work here.</span>
<span class="k">pass</span>
</pre></div>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
<p>Populated only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.horizontal_page_breaks">
<code class="descname">horizontal_page_breaks</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.sheet.Sheet.horizontal_page_breaks" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of the horizontal page breaks in this sheet.
Breaks are tuples in the form
<code class="docutils literal"><span class="pre">(index</span> <span class="pre">of</span> <span class="pre">row</span> <span class="pre">after</span> <span class="pre">break,</span> <span class="pre">start</span> <span class="pre">col</span> <span class="pre">index,</span> <span class="pre">end</span> <span class="pre">col</span> <span class="pre">index)</span></code>.</p>
<p>Populated only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.vertical_page_breaks">
<code class="descname">vertical_page_breaks</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.sheet.Sheet.vertical_page_breaks" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of the vertical page breaks in this sheet.
Breaks are tuples in the form
<code class="docutils literal"><span class="pre">(index</span> <span class="pre">of</span> <span class="pre">col</span> <span class="pre">after</span> <span class="pre">break,</span> <span class="pre">start</span> <span class="pre">row</span> <span class="pre">index,</span> <span class="pre">end</span> <span class="pre">row</span> <span class="pre">index)</span></code>.</p>
<p>Populated only if <code class="docutils literal"><span class="pre">open_workbook(...,</span> <span class="pre">formatting_info=True)</span></code></p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.visibility">
<code class="descname">visibility</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Sheet.visibility" title="Permalink to this definition">¶</a></dt>
<dd><p>Visibility of the sheet:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="o">=</span> <span class="n">visible</span>
<span class="mi">1</span> <span class="o">=</span> <span class="n">hidden</span> <span class="p">(</span><span class="n">can</span> <span class="n">be</span> <span class="n">unhidden</span> <span class="n">by</span> <span class="n">user</span> <span class="o">--</span> <span class="n">Format</span> <span class="o">-></span> <span class="n">Sheet</span> <span class="o">-></span> <span class="n">Unhide</span><span class="p">)</span>
<span class="mi">2</span> <span class="o">=</span> <span class="s2">"very hidden"</span> <span class="p">(</span><span class="n">can</span> <span class="n">be</span> <span class="n">unhidden</span> <span class="n">only</span> <span class="n">by</span> <span class="n">VBA</span> <span class="n">macro</span><span class="p">)</span><span class="o">.</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.hyperlink_list">
<code class="descname">hyperlink_list</code><em class="property"> = []</em><a class="headerlink" href="#xlrd.sheet.Sheet.hyperlink_list" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <a class="reference internal" href="#xlrd.sheet.Hyperlink" title="xlrd.sheet.Hyperlink"><code class="xref py py-class docutils literal"><span class="pre">Hyperlink</span></code></a> objects corresponding to <code class="docutils literal"><span class="pre">HLINK</span></code> records
found in the worksheet.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.hyperlink_map">
<code class="descname">hyperlink_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.sheet.Sheet.hyperlink_map" title="Permalink to this definition">¶</a></dt>
<dd><p>A sparse mapping from <code class="docutils literal"><span class="pre">(rowx,</span> <span class="pre">colx)</span></code> to an item in
<a class="reference internal" href="#xlrd.sheet.Sheet.hyperlink_list" title="xlrd.sheet.Sheet.hyperlink_list"><code class="xref py py-attr docutils literal"><span class="pre">hyperlink_list</span></code></a>.
Cells not covered by a hyperlink are not mapped.
It is possible using the Excel UI to set up a hyperlink that
covers a larger-than-1x1 rectangle of cells.
Hyperlink rectangles may overlap (Excel doesn’t check).
When a multiply-covered cell is clicked on, the hyperlink that is
activated
(and the one that is mapped here) is the last in
<a class="reference internal" href="#xlrd.sheet.Sheet.hyperlink_list" title="xlrd.sheet.Sheet.hyperlink_list"><code class="xref py py-attr docutils literal"><span class="pre">hyperlink_list</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Sheet.cell_note_map">
<code class="descname">cell_note_map</code><em class="property"> = {}</em><a class="headerlink" href="#xlrd.sheet.Sheet.cell_note_map" title="Permalink to this definition">¶</a></dt>
<dd><p>A sparse mapping from <code class="docutils literal"><span class="pre">(rowx,</span> <span class="pre">colx)</span></code> to a <a class="reference internal" href="#xlrd.sheet.Note" title="xlrd.sheet.Note"><code class="xref py py-class docutils literal"><span class="pre">Note</span></code></a> object.
Cells not containing a note (“comment”) are not mapped.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.cell">
<code class="descname">cell</code><span class="sig-paren">(</span><em>rowx</em>, <em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.cell" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> object in the given row and column.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.cell_value">
<code class="descname">cell_value</code><span class="sig-paren">(</span><em>rowx</em>, <em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.cell_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Value of the cell in the given row and column.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.cell_type">
<code class="descname">cell_type</code><span class="sig-paren">(</span><em>rowx</em>, <em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.cell_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Type of the cell in the given row and column.</p>
<p>Refer to the documentation of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> class.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.cell_xf_index">
<code class="descname">cell_xf_index</code><span class="sig-paren">(</span><em>rowx</em>, <em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.cell_xf_index" title="Permalink to this definition">¶</a></dt>
<dd><p>XF index of the cell in the given row and column.
This is an index into <a class="reference internal" href="#xlrd.book.Book.xf_list" title="xlrd.book.Book.xf_list"><code class="xref py py-attr docutils literal"><span class="pre">xf_list</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.row_len">
<code class="descname">row_len</code><span class="sig-paren">(</span><em>rowx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.row_len" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the effective number of cells in the given row. For use with
<code class="docutils literal"><span class="pre">open_workbook(ragged_rows=True)</span></code> which is likely to produce rows
with fewer than <a class="reference internal" href="#xlrd.sheet.Sheet.ncols" title="xlrd.sheet.Sheet.ncols"><code class="xref py py-attr docutils literal"><span class="pre">ncols</span></code></a> cells.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.row">
<code class="descname">row</code><span class="sig-paren">(</span><em>rowx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.row" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a sequence of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> objects in the given row.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.get_rows">
<code class="descname">get_rows</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.get_rows" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a generator for iterating through each row.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.row_types">
<code class="descname">row_types</code><span class="sig-paren">(</span><em>rowx</em>, <em>start_colx=0</em>, <em>end_colx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.row_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slice of the types of the cells in the given row.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.row_values">
<code class="descname">row_values</code><span class="sig-paren">(</span><em>rowx</em>, <em>start_colx=0</em>, <em>end_colx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.row_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slice of the values of the cells in the given row.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.row_slice">
<code class="descname">row_slice</code><span class="sig-paren">(</span><em>rowx</em>, <em>start_colx=0</em>, <em>end_colx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.row_slice" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slice of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> objects in the given row.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.col_slice">
<code class="descname">col_slice</code><span class="sig-paren">(</span><em>colx</em>, <em>start_rowx=0</em>, <em>end_rowx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.col_slice" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slice of the <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> objects in the given column.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.col_values">
<code class="descname">col_values</code><span class="sig-paren">(</span><em>colx</em>, <em>start_rowx=0</em>, <em>end_rowx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.col_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slice of the values of the cells in the given column.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.col_types">
<code class="descname">col_types</code><span class="sig-paren">(</span><em>colx</em>, <em>start_rowx=0</em>, <em>end_rowx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.col_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slice of the types of the cells in the given column.</p>
</dd></dl>
<dl class="method">
<dt id="xlrd.sheet.Sheet.computed_column_width">
<code class="descname">computed_column_width</code><span class="sig-paren">(</span><em>colx</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Sheet.computed_column_width" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine column display width.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>colx</strong> – Index of the queried column, range 0 to 255.
Note that it is possible to find out the width that will be used to
display columns with no cell information e.g. column IV (colx=255).</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The column width that will be used for displaying
the given column by Excel, in units of 1/256th of the width of a
standard character (the digit zero in the first font).</td>
</tr>
</tbody>
</table>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
</dd></dl>
</dd></dl>
<span class="target" id="module-xlrd.sheet"></span><dl class="class">
<dt id="xlrd.sheet.Note">
<em class="property">class </em><code class="descclassname">xlrd.sheet.</code><code class="descname">Note</code><a class="headerlink" href="#xlrd.sheet.Note" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a user “comment” or “note”.
Note objects are accessible through <a class="reference internal" href="#xlrd.sheet.Sheet.cell_note_map" title="xlrd.sheet.Sheet.cell_note_map"><code class="xref py py-attr docutils literal"><span class="pre">Sheet.cell_note_map</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.sheet.Note.author">
<code class="descname">author</code><em class="property"> = ''</em><a class="headerlink" href="#xlrd.sheet.Note.author" title="Permalink to this definition">¶</a></dt>
<dd><p>Author of note</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.col_hidden">
<code class="descname">col_hidden</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Note.col_hidden" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">True</span></code> if the containing column is hidden</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.colx">
<code class="descname">colx</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Note.colx" title="Permalink to this definition">¶</a></dt>
<dd><p>Column index</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.rich_text_runlist">
<code class="descname">rich_text_runlist</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Note.rich_text_runlist" title="Permalink to this definition">¶</a></dt>
<dd><p>List of <code class="docutils literal"><span class="pre">(offset_in_string,</span> <span class="pre">font_index)</span></code> tuples.
Unlike <a class="reference internal" href="#xlrd.sheet.Sheet.rich_text_runlist_map" title="xlrd.sheet.Sheet.rich_text_runlist_map"><code class="xref py py-attr docutils literal"><span class="pre">Sheet.rich_text_runlist_map</span></code></a>, the first offset should
always be 0.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.row_hidden">
<code class="descname">row_hidden</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Note.row_hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>True if the containing row is hidden</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.rowx">
<code class="descname">rowx</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Note.rowx" title="Permalink to this definition">¶</a></dt>
<dd><p>Row index</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.show">
<code class="descname">show</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Note.show" title="Permalink to this definition">¶</a></dt>
<dd><p>True if note is always shown</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Note.text">
<code class="descname">text</code><em class="property"> = ''</em><a class="headerlink" href="#xlrd.sheet.Note.text" title="Permalink to this definition">¶</a></dt>
<dd><p>Text of the note</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.sheet.Hyperlink">
<em class="property">class </em><code class="descclassname">xlrd.sheet.</code><code class="descname">Hyperlink</code><a class="headerlink" href="#xlrd.sheet.Hyperlink" title="Permalink to this definition">¶</a></dt>
<dd><p>Contains the attributes of a hyperlink.
Hyperlink objects are accessible through <a class="reference internal" href="#xlrd.sheet.Sheet.hyperlink_list" title="xlrd.sheet.Sheet.hyperlink_list"><code class="xref py py-attr docutils literal"><span class="pre">Sheet.hyperlink_list</span></code></a>
and <a class="reference internal" href="#xlrd.sheet.Sheet.hyperlink_map" title="xlrd.sheet.Sheet.hyperlink_map"><code class="xref py py-attr docutils literal"><span class="pre">Sheet.hyperlink_map</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.7.2.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.frowx">
<code class="descname">frowx</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.frowx" title="Permalink to this definition">¶</a></dt>
<dd><p>Index of first row</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.lrowx">
<code class="descname">lrowx</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.lrowx" title="Permalink to this definition">¶</a></dt>
<dd><p>Index of last row</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.fcolx">
<code class="descname">fcolx</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.fcolx" title="Permalink to this definition">¶</a></dt>
<dd><p>Index of first column</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.lcolx">
<code class="descname">lcolx</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.lcolx" title="Permalink to this definition">¶</a></dt>
<dd><p>Index of last column</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.type">
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.type" title="Permalink to this definition">¶</a></dt>
<dd><p>Type of hyperlink. Unicode string, one of ‘url’, ‘unc’,
‘local file’, ‘workbook’, ‘unknown’</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.url_or_path">
<code class="descname">url_or_path</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.url_or_path" title="Permalink to this definition">¶</a></dt>
<dd><p>The URL or file-path, depending in the type. Unicode string, except
in the rare case of a local but non-existent file with non-ASCII
characters in the name, in which case only the “8.3” filename is
available, as a <code class="xref py py-class docutils literal"><span class="pre">bytes</span></code> (3.x) or <code class="xref py py-class docutils literal"><span class="pre">str</span></code> (2.x) string,
<em>with unknown encoding.</em></p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.desc">
<code class="descname">desc</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.desc" title="Permalink to this definition">¶</a></dt>
<dd><p>Description.
This is displayed in the cell,
and should be identical to the cell value. Unicode string, or <code class="docutils literal"><span class="pre">None</span></code>.
It seems impossible NOT to have a description created by the Excel UI.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.target">
<code class="descname">target</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.target" title="Permalink to this definition">¶</a></dt>
<dd><p>Target frame. Unicode string.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">No cases of this have been seen in the wild.
It seems impossible to create one in the Excel UI.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.textmark">
<code class="descname">textmark</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.textmark" title="Permalink to this definition">¶</a></dt>
<dd><p>The piece after the “#” in
“<a class="reference external" href="http://docs.python.org/library#struct_module">http://docs.python.org/library#struct_module</a>”, or the <code class="docutils literal"><span class="pre">Sheet1!A1:Z99</span></code>
part when type is “workbook”.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Hyperlink.quicktip">
<code class="descname">quicktip</code><em class="property"> = None</em><a class="headerlink" href="#xlrd.sheet.Hyperlink.quicktip" title="Permalink to this definition">¶</a></dt>
<dd><p>The text of the “quick tip” displayed when the cursor
hovers over the hyperlink.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.sheet.Cell">
<em class="property">class </em><code class="descclassname">xlrd.sheet.</code><code class="descname">Cell</code><span class="sig-paren">(</span><em>ctype</em>, <em>value</em>, <em>xf_index=None</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.sheet.Cell" title="Permalink to this definition">¶</a></dt>
<dd><p>Contains the data for one cell.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You don’t call this class yourself. You access <a class="reference internal" href="#xlrd.sheet.Cell" title="xlrd.sheet.Cell"><code class="xref py py-class docutils literal"><span class="pre">Cell</span></code></a> objects
via methods of the <a class="reference internal" href="#xlrd.sheet.Sheet" title="xlrd.sheet.Sheet"><code class="xref py py-class docutils literal"><span class="pre">Sheet</span></code></a> object(s) that you found in the
<a class="reference internal" href="#xlrd.book.Book" title="xlrd.book.Book"><code class="xref py py-class docutils literal"><span class="pre">Book</span></code></a> object that was returned when you called
<a class="reference internal" href="#xlrd.open_workbook" title="xlrd.open_workbook"><code class="xref py py-func docutils literal"><span class="pre">open_workbook()</span></code></a></p>
</div>
<p>Cell objects have three attributes: <code class="docutils literal"><span class="pre">ctype</span></code> is an int, <code class="docutils literal"><span class="pre">value</span></code>
(which depends on <code class="docutils literal"><span class="pre">ctype</span></code>) and <code class="docutils literal"><span class="pre">xf_index</span></code>.
If <code class="docutils literal"><span class="pre">formatting_info</span></code> is not enabled when the workbook is opened,
<code class="docutils literal"><span class="pre">xf_index</span></code> will be <code class="docutils literal"><span class="pre">None</span></code>.</p>
<p>The following table describes the types of cells and how their values
are represented in Python.</p>
<table border="1" cellpadding="7">
<tr>
<th>Type symbol</th>
<th>Type number</th>
<th>Python value</th>
</tr>
<tr>
<td>XL_CELL_EMPTY</td>
<td align="center">0</td>
<td>empty string u''</td>
</tr>
<tr>
<td>XL_CELL_TEXT</td>
<td align="center">1</td>
<td>a Unicode string</td>
</tr>
<tr>
<td>XL_CELL_NUMBER</td>
<td align="center">2</td>
<td>float</td>
</tr>
<tr>
<td>XL_CELL_DATE</td>
<td align="center">3</td>
<td>float</td>
</tr>
<tr>
<td>XL_CELL_BOOLEAN</td>
<td align="center">4</td>
<td>int; 1 means TRUE, 0 means FALSE</td>
</tr>
<tr>
<td>XL_CELL_ERROR</td>
<td align="center">5</td>
<td>int representing internal Excel codes; for a text representation,
refer to the supplied dictionary error_text_from_code</td>
</tr>
<tr>
<td>XL_CELL_BLANK</td>
<td align="center">6</td>
<td>empty string u''. Note: this type will appear only when
open_workbook(..., formatting_info=True) is used.</td>
</tr>
</table></dd></dl>
<dl class="class">
<dt id="xlrd.sheet.Colinfo">
<em class="property">class </em><code class="descclassname">xlrd.sheet.</code><code class="descname">Colinfo</code><a class="headerlink" href="#xlrd.sheet.Colinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Width and default formatting information that applies to one or
more columns in a sheet. Derived from <code class="docutils literal"><span class="pre">COLINFO</span></code> records.</p>
<p>Here is the default hierarchy for width, according to the OOo docs:</p>
<blockquote>
<div><p>In BIFF3, if a <code class="docutils literal"><span class="pre">COLINFO</span></code> record is missing for a column,
the width specified in the record <code class="docutils literal"><span class="pre">DEFCOLWIDTH</span></code> is used instead.</p>
<p>In BIFF4-BIFF7, the width set in this <code class="docutils literal"><span class="pre">COLINFO</span></code> record is only used,
if the corresponding bit for this column is cleared in the <code class="docutils literal"><span class="pre">GCW</span></code>
record, otherwise the column width set in the <code class="docutils literal"><span class="pre">DEFCOLWIDTH</span></code> record
is used (the <code class="docutils literal"><span class="pre">STANDARDWIDTH</span></code> record is always ignored in this case <a class="footnote-reference" href="#f1" id="id1">[1]</a>).</p>
<p>In BIFF8, if a <code class="docutils literal"><span class="pre">COLINFO</span></code> record is missing for a column,
the width specified in the record <code class="docutils literal"><span class="pre">STANDARDWIDTH</span></code> is used.
If this <code class="docutils literal"><span class="pre">STANDARDWIDTH</span></code> record is also missing,
the column width of the record <code class="docutils literal"><span class="pre">DEFCOLWIDTH</span></code> is used instead.</p>
</div></blockquote>
<table class="docutils footnote" frame="void" id="f1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><p class="first">The docs on the <code class="docutils literal"><span class="pre">GCW</span></code> record say this:</p>
<p>If a bit is set, the corresponding column uses the width set in the
<code class="docutils literal"><span class="pre">STANDARDWIDTH</span></code> record. If a bit is cleared, the corresponding column
uses the width set in the <code class="docutils literal"><span class="pre">COLINFO</span></code> record for this column.</p>
<p class="last">If a bit is set, and the worksheet does not contain the <code class="docutils literal"><span class="pre">STANDARDWIDTH</span></code>
record, or if the bit is cleared, and the worksheet does not contain the
<code class="docutils literal"><span class="pre">COLINFO</span></code> record, the <code class="docutils literal"><span class="pre">DEFCOLWIDTH</span></code> record of the worksheet will be
used instead.</p>
</td></tr>
</tbody>
</table>
<p>xlrd goes with the GCW version of the story.
Reference to the source may be useful: see
<a class="reference internal" href="#xlrd.sheet.Sheet.computed_column_width" title="xlrd.sheet.Sheet.computed_column_width"><code class="xref py py-meth docutils literal"><span class="pre">Sheet.computed_column_width()</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.sheet.Colinfo.width">
<code class="descname">width</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Colinfo.width" title="Permalink to this definition">¶</a></dt>
<dd><p>Width of the column in 1/256 of the width of the zero character,
using default font (first <code class="docutils literal"><span class="pre">FONT</span></code> record in the file).</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Colinfo.xf_index">
<code class="descname">xf_index</code><em class="property"> = -1</em><a class="headerlink" href="#xlrd.sheet.Colinfo.xf_index" title="Permalink to this definition">¶</a></dt>
<dd><p>XF index to be used for formatting empty cells.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Colinfo.hidden">
<code class="descname">hidden</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Colinfo.hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = column is hidden</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Colinfo.bit1_flag">
<code class="descname">bit1_flag</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Colinfo.bit1_flag" title="Permalink to this definition">¶</a></dt>
<dd><p>Value of a 1-bit flag whose purpose is unknown
but is often seen set to 1</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Colinfo.outline_level">
<code class="descname">outline_level</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Colinfo.outline_level" title="Permalink to this definition">¶</a></dt>
<dd><p>Outline level of the column, in <code class="docutils literal"><span class="pre">range(7)</span></code>.
(0 = no outline)</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Colinfo.collapsed">
<code class="descname">collapsed</code><em class="property"> = 0</em><a class="headerlink" href="#xlrd.sheet.Colinfo.collapsed" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = column is collapsed</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="xlrd.sheet.Rowinfo">
<em class="property">class </em><code class="descclassname">xlrd.sheet.</code><code class="descname">Rowinfo</code><a class="headerlink" href="#xlrd.sheet.Rowinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Height and default formatting information that applies to a row in a sheet.
Derived from <code class="docutils literal"><span class="pre">ROW</span></code> records.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.6.1.</span></p>
</div>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.height">
<code class="descname">height</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.height" title="Permalink to this definition">¶</a></dt>
<dd><p>Height of the row, in twips. One twip == 1/20 of a point.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.has_default_height">
<code class="descname">has_default_height</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.has_default_height" title="Permalink to this definition">¶</a></dt>
<dd><p>0 = Row has custom height; 1 = Row has default height.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.outline_level">
<code class="descname">outline_level</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.outline_level" title="Permalink to this definition">¶</a></dt>
<dd><p>Outline level of the row (0 to 7)</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.outline_group_starts_ends">
<code class="descname">outline_group_starts_ends</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.outline_group_starts_ends" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Outline group starts or ends here (depending on where the
outline buttons are located, see <code class="docutils literal"><span class="pre">WSBOOL</span></code> record, which is not
parsed by xlrd), <em>and</em> is collapsed.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.hidden">
<code class="descname">hidden</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Row is hidden (manually, or by a filter or outline group)</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.height_mismatch">
<code class="descname">height_mismatch</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.height_mismatch" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = Row height and default font height do not match.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.has_default_xf_index">
<code class="descname">has_default_xf_index</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.has_default_xf_index" title="Permalink to this definition">¶</a></dt>
<dd><p>1 = the xf_index attribute is usable; 0 = ignore it.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.xf_index">
<code class="descname">xf_index</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.xf_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Index to default <a class="reference internal" href="#xlrd.formatting.XF" title="xlrd.formatting.XF"><code class="xref py py-class docutils literal"><span class="pre">XF</span></code></a> record for empty cells
in this row. Don’t use this if <code class="docutils literal"><span class="pre">has_default_xf_index</span> <span class="pre">==</span> <span class="pre">0</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.additional_space_above">
<code class="descname">additional_space_above</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.additional_space_above" title="Permalink to this definition">¶</a></dt>
<dd><p>This flag is set if the upper border of at least one cell in this
row or if the lower border of at least one cell in the row above is
formatted with a thick line style. Thin and medium line styles are
not taken into account.</p>
</dd></dl>
<dl class="attribute">
<dt id="xlrd.sheet.Rowinfo.additional_space_below">
<code class="descname">additional_space_below</code><a class="headerlink" href="#xlrd.sheet.Rowinfo.additional_space_below" title="Permalink to this definition">¶</a></dt>
<dd><p>This flag is set if the lower border of at least one cell in this row
or if the upper border of at least one cell in the row below is
formatted with a medium or thick line style. Thin line styles are not
taken into account.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-xlrd.xldate">
<span id="xlrd-xldate"></span><h2>xlrd.xldate<a class="headerlink" href="#module-xlrd.xldate" title="Permalink to this headline">¶</a></h2>
<p>Tools for working with dates and times in Excel files.</p>
<p>The conversion from <code class="docutils literal"><span class="pre">days</span></code> to <code class="docutils literal"><span class="pre">(year,</span> <span class="pre">month,</span> <span class="pre">day)</span></code> starts with
an integral “julian day number” aka JDN.
FWIW:</p>
<ul class="simple">
<li>JDN 0 corresponds to noon on Monday November 24 in Gregorian year -4713.</li>
</ul>
<p>More importantly:</p>
<ul class="simple">
<li>Noon on Gregorian 1900-03-01 (day 61 in the 1900-based system) is JDN 2415080.0</li>
<li>Noon on Gregorian 1904-01-02 (day 1 in the 1904-based system) is JDN 2416482.0</li>
</ul>
<dl class="exception">
<dt id="xlrd.xldate.XLDateError">
<em class="property">exception </em><code class="descclassname">xlrd.xldate.</code><code class="descname">XLDateError</code><a class="headerlink" href="#xlrd.xldate.XLDateError" title="Permalink to this definition">¶</a></dt>
<dd><p>A base class for all datetime-related errors.</p>
</dd></dl>
<dl class="exception">
<dt id="xlrd.xldate.XLDateNegative">
<em class="property">exception </em><code class="descclassname">xlrd.xldate.</code><code class="descname">XLDateNegative</code><a class="headerlink" href="#xlrd.xldate.XLDateNegative" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">xldate</span> <span class="pre"><</span> <span class="pre">0.00</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="xlrd.xldate.XLDateAmbiguous">
<em class="property">exception </em><code class="descclassname">xlrd.xldate.</code><code class="descname">XLDateAmbiguous</code><a class="headerlink" href="#xlrd.xldate.XLDateAmbiguous" title="Permalink to this definition">¶</a></dt>
<dd><p>The 1900 leap-year problem <code class="docutils literal"><span class="pre">(datemode</span> <span class="pre">==</span> <span class="pre">0</span> <span class="pre">and</span> <span class="pre">1.0</span> <span class="pre"><=</span> <span class="pre">xldate</span> <span class="pre"><</span> <span class="pre">61.0)</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="xlrd.xldate.XLDateTooLarge">
<em class="property">exception </em><code class="descclassname">xlrd.xldate.</code><code class="descname">XLDateTooLarge</code><a class="headerlink" href="#xlrd.xldate.XLDateTooLarge" title="Permalink to this definition">¶</a></dt>
<dd><p>Gregorian year 10000 or later</p>
</dd></dl>
<dl class="exception">
<dt id="xlrd.xldate.XLDateBadDatemode">
<em class="property">exception </em><code class="descclassname">xlrd.xldate.</code><code class="descname">XLDateBadDatemode</code><a class="headerlink" href="#xlrd.xldate.XLDateBadDatemode" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">datemode</span></code> arg is neither 0 nor 1</p>
</dd></dl>
<dl class="function">
<dt id="xlrd.xldate.xldate_as_tuple">
<code class="descclassname">xlrd.xldate.</code><code class="descname">xldate_as_tuple</code><span class="sig-paren">(</span><em>xldate</em>, <em>datemode</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.xldate.xldate_as_tuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert an Excel number (presumed to represent a date, a datetime or a time) into
a tuple suitable for feeding to datetime or mx.DateTime constructors.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>xldate</strong> – The Excel number</li>
<li><strong>datemode</strong> – 0: 1900-based, 1: 1904-based.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple">
<li><a class="reference internal" href="#xlrd.xldate.XLDateNegative" title="xlrd.xldate.XLDateNegative"><strong>xlrd.xldate.XLDateNegative</strong></a> – </li>
<li><a class="reference internal" href="#xlrd.xldate.XLDateAmbiguous" title="xlrd.xldate.XLDateAmbiguous"><strong>xlrd.xldate.XLDateAmbiguous</strong></a> – </li>
<li><a class="reference internal" href="#xlrd.xldate.XLDateTooLarge" title="xlrd.xldate.XLDateTooLarge"><strong>xlrd.xldate.XLDateTooLarge</strong></a> – </li>
<li><a class="reference internal" href="#xlrd.xldate.XLDateBadDatemode" title="xlrd.xldate.XLDateBadDatemode"><strong>xlrd.xldate.XLDateBadDatemode</strong></a> – </li>
<li><a class="reference internal" href="#xlrd.xldate.XLDateError" title="xlrd.xldate.XLDateError"><strong>xlrd.xldate.XLDateError</strong></a> – </li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Gregorian <code class="docutils literal"><span class="pre">(year,</span> <span class="pre">month,</span> <span class="pre">day,</span> <span class="pre">hour,</span> <span class="pre">minute,</span> <span class="pre">nearest_second)</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">When using this function to interpret the contents of a workbook, you
should pass in the <a class="reference internal" href="#xlrd.book.Book.datemode" title="xlrd.book.Book.datemode"><code class="xref py py-attr docutils literal"><span class="pre">datemode</span></code></a>
attribute of that workbook. Whether the workbook has ever been anywhere
near a Macintosh is irrelevant.</p>
</div>
<div class="admonition-special-case admonition">
<p class="first admonition-title">Special case</p>
<p class="last">If <code class="docutils literal"><span class="pre">0.0</span> <span class="pre"><=</span> <span class="pre">xldate</span> <span class="pre"><</span> <span class="pre">1.0</span></code>, it is assumed to represent a time;
<code class="docutils literal"><span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">0,</span> <span class="pre">hour,</span> <span class="pre">minute,</span> <span class="pre">second)</span></code> will be returned.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">1904-01-01</span></code> is not regarded as a valid date in the <code class="docutils literal"><span class="pre">datemode==1</span></code>
system; its “serial number” is zero.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="xlrd.xldate.xldate_as_datetime">
<code class="descclassname">xlrd.xldate.</code><code class="descname">xldate_as_datetime</code><span class="sig-paren">(</span><em>xldate</em>, <em>datemode</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.xldate.xldate_as_datetime" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert an Excel date/time number into a <code class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></code> object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>xldate</strong> – The Excel number</li>
<li><strong>datemode</strong> – 0: 1900-based, 1: 1904-based.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A <code class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></code> object.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="xlrd.xldate.xldate_from_date_tuple">
<code class="descclassname">xlrd.xldate.</code><code class="descname">xldate_from_date_tuple</code><span class="sig-paren">(</span><em>date_tuple</em>, <em>datemode</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.xldate.xldate_from_date_tuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a date tuple (year, month, day) to an Excel date.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>year</strong> – Gregorian year.</li>
<li><strong>month</strong> – <code class="docutils literal"><span class="pre">1</span> <span class="pre"><=</span> <span class="pre">month</span> <span class="pre"><=</span> <span class="pre">12</span></code></li>
<li><strong>day</strong> – <code class="docutils literal"><span class="pre">1</span> <span class="pre"><=</span> <span class="pre">day</span> <span class="pre"><=</span> <span class="pre">last</span> <span class="pre">day</span> <span class="pre">of</span> <span class="pre">that</span> <span class="pre">(year,</span> <span class="pre">month)</span></code></li>
<li><strong>datemode</strong> – 0: 1900-based, 1: 1904-based.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="#xlrd.xldate.XLDateAmbiguous" title="xlrd.xldate.XLDateAmbiguous"><strong>xlrd.xldate.XLDateAmbiguous</strong></a> – </li>
<li><a class="reference internal" href="#xlrd.xldate.XLDateBadDatemode" title="xlrd.xldate.XLDateBadDatemode"><strong>xlrd.xldate.XLDateBadDatemode</strong></a> – </li>
<li><strong>xlrd.xldate.XLDateBadTuple</strong> – <code class="docutils literal"><span class="pre">(year,</span> <span class="pre">month,</span> <span class="pre">day)</span></code> is too early/late or has invalid component(s)</li>
<li><a class="reference internal" href="#xlrd.xldate.XLDateError" title="xlrd.xldate.XLDateError"><strong>xlrd.xldate.XLDateError</strong></a> – </li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="xlrd.xldate.xldate_from_time_tuple">
<code class="descclassname">xlrd.xldate.</code><code class="descname">xldate_from_time_tuple</code><span class="sig-paren">(</span><em>time_tuple</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.xldate.xldate_from_time_tuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a time tuple <code class="docutils literal"><span class="pre">(hour,</span> <span class="pre">minute,</span> <span class="pre">second)</span></code> to an Excel “date” value
(fraction of a day).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>hour</strong> – <code class="docutils literal"><span class="pre">0</span> <span class="pre"><=</span> <span class="pre">hour</span> <span class="pre"><</span> <span class="pre">24</span></code></li>
<li><strong>minute</strong> – <code class="docutils literal"><span class="pre">0</span> <span class="pre"><=</span> <span class="pre">minute</span> <span class="pre"><</span> <span class="pre">60</span></code></li>
<li><strong>second</strong> – <code class="docutils literal"><span class="pre">0</span> <span class="pre"><=</span> <span class="pre">second</span> <span class="pre"><</span> <span class="pre">60</span></code></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>xlrd.xldate.XLDateBadTuple</strong> – Out-of-range hour, minute, or second</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="xlrd.xldate.xldate_from_datetime_tuple">
<code class="descclassname">xlrd.xldate.</code><code class="descname">xldate_from_datetime_tuple</code><span class="sig-paren">(</span><em>datetime_tuple</em>, <em>datemode</em><span class="sig-paren">)</span><a class="headerlink" href="#xlrd.xldate.xldate_from_datetime_tuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a datetime tuple <code class="docutils literal"><span class="pre">(year,</span> <span class="pre">month,</span> <span class="pre">day,</span> <span class="pre">hour,</span> <span class="pre">minute,</span> <span class="pre">second)</span></code> to an
Excel date value.
For more details, refer to other xldate_from_*_tuple functions.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>datetime_tuple</strong> – <code class="docutils literal"><span class="pre">(year,</span> <span class="pre">month,</span> <span class="pre">day,</span> <span class="pre">hour,</span> <span class="pre">minute,</span> <span class="pre">second)</span></code></li>
<li><strong>datemode</strong> – 0: 1900-based, 1: 1904-based.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">API Reference</a><ul>
<li><a class="reference internal" href="#module-xlrd">xlrd</a></li>
<li><a class="reference internal" href="#module-xlrd.biffh">xlrd.biffh</a></li>
<li><a class="reference internal" href="#module-xlrd.book">xlrd.book</a></li>
<li><a class="reference internal" href="#module-xlrd.compdoc">xlrd.compdoc</a></li>
<li><a class="reference internal" href="#module-xlrd.formatting">xlrd.formatting</a></li>
<li><a class="reference internal" href="#module-xlrd.formula">xlrd.formula</a></li>
<li><a class="reference internal" href="#xlrd-sheet">xlrd.sheet</a></li>
<li><a class="reference internal" href="#module-xlrd.xldate">xlrd.xldate</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="vulnerabilities.html"
title="previous chapter">XML vulnerabilities and Excel files</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="installation.html"
title="next chapter">Installation Instructions</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/api.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation Instructions"
>next</a> |</li>
<li class="right" >
<a href="vulnerabilities.html" title="XML vulnerabilities and Excel files"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">xlrd 1.1.0 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2005-2017 Stephen John Machin, Lingfo Pty Ltd.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
</div>
</body>
</html>
|