CHANGELOG.rst 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. Changes
  2. =======
  3. 2.0.1 (11 December 2020)
  4. ------------------------
  5. - Use the README as the long description on PyPI.
  6. 2.0.0 (11 December 2020)
  7. ------------------------
  8. - Remove support for anything other than ``.xls`` files.
  9. - Remove support for ``psyco``.
  10. - Change the default encoding used when no ``CODEPAGE`` record can be found
  11. from ``ascii`` to ``iso-8859-1``.
  12. - Add support for iterating over :class:`~xlrd.book.Book` objects.
  13. - Add support for item access from :class:`~xlrd.book.Book` objects,
  14. where integer indices and string sheet names are supported.
  15. - Non-unicode spaces are now stripped from the "last author" information.
  16. - Workbook corruption errors can now be ignored using the
  17. ``ignore_workbook_corruption`` option to :class:`~xlrd.open_workbook`.
  18. - Handle ``WRITEACCESS`` records with invalid trailing characters.
  19. - Officially support Python 3.8 and 3.9.
  20. Thanks to the following for their contributions to this release:
  21. - Jon Dufresne
  22. - Tore Lundqvist
  23. - nayyarv
  24. - Michael Davis
  25. - skonik
  26. 1.2.0 (15 December 2018)
  27. ------------------------
  28. - Added support for Python 3.7.
  29. - Added optional support for defusedxml to help mitigate exploits.
  30. - Automatically convert ``~`` in file paths to the current user's home
  31. directory.
  32. - Removed ``examples`` directory from the installed package. They are still
  33. available in the source distribution.
  34. - Fixed ``time.clock()`` deprecation warning.
  35. 1.1.0 (22 August 2017)
  36. ----------------------
  37. - Fix for parsing of merged cells containing a single cell reference in xlsx
  38. files.
  39. - Fix for "invalid literal for int() with base 10: 'true'" when reading some
  40. xlsx files.
  41. - Make xldate_as_datetime available to import direct from xlrd.
  42. - Build universal wheels.
  43. - Sphinx documentation.
  44. - Document the problem with XML vulnerabilities in xlsx files and mitigation
  45. measures.
  46. - Fix :class:`NameError` on ``has_defaults is not defined``.
  47. - Some whitespace and code style tweaks.
  48. - Make example in README compatible with both Python 2 and 3.
  49. - Add default value for cells containing errors that causeed parsing of some
  50. xlsx files to fail.
  51. - Add Python 3.6 to the list of supported Python versions, drop 3.3 and 2.6.
  52. - Use generator expressions to avoid unnecessary lists in memory.
  53. - Document unicode encoding used in Excel files from Excel 97 onwards.
  54. - Report hyperlink errors in R1C1 syntax.
  55. Thanks to the following for their contributions to this release:
  56. - icereval@gmail.com
  57. - Daniel Rech
  58. - Ville Skyttä
  59. - Yegor Yefremov
  60. - Maxime Lorant
  61. - Alexandr N Zamaraev
  62. - Zhaorong Ma
  63. - Jon Dufresne
  64. - Chris McIntyre
  65. - coltleese@gmail.com
  66. - Ivan Masá
  67. 1.0.0 (2 June 2016)
  68. -------------------
  69. - Official support, such as it is, is now for 2.6, 2.7, 3.3+
  70. - Fixes a bug in looking up non-lowercase sheet filenames by ensuring that the
  71. sheet targets are transformed the same way as the component_names dict keys.
  72. - Fixes a bug for ``ragged_rows=False`` when merged cells increases the number
  73. of columns in the sheet. This requires all rows to be extended to ensure equal
  74. row lengths that match the number of columns in the sheet.
  75. - Fixes to enable reading of SAP-generated .xls files.
  76. - support BIFF4 files with missing FORMAT records.
  77. - support files with missing WINDOW2 record.
  78. - Empty cells are now always unicode strings, they were a bytestring on
  79. Python 2 and a unicode string on Python 3.
  80. - Fix for ``<cell>`` ``inlineStr`` attribute without ``<si>`` child.
  81. - Fix for a zoom of ``None`` causing problems on Python 3.
  82. - Fix parsing of bad dimensions.
  83. - Fix xlsx sheet to comments relationship.
  84. Thanks to the following for their contributions to this release:
  85. - Lars-Erik Hannelius
  86. - Deshi Xiao
  87. - Stratos Moro
  88. - Volker Diels-Grabsch
  89. - John McNamara
  90. - Ville Skyttä
  91. - Patrick Fuller
  92. - Dragon Dave McKee
  93. - Gunnlaugur Þór Briem
  94. 0.9.4 (14 July 2015)
  95. --------------------
  96. - Automated tests are now run on Python 3.4
  97. - Use ``ElementTree.iter()`` if available, instead of the deprecated
  98. ``getiterator()`` when parsing xlsx files.
  99. - Fix #106 : Exception Value: unorderable types: Name() < Name()
  100. - Create row generator expression with Sheet.get_rows()
  101. - Fix for forward slash file separator and lowercase names within xlsx
  102. internals.
  103. Thanks to the following for their contributions to this release:
  104. - Corey Farwell
  105. - Jonathan Kamens
  106. - Deepak N
  107. - Brandon R. Stoner
  108. - John McNamara
  109. 0.9.3 (8 Apr 2014)
  110. ------------------
  111. - Github issue #49
  112. - Github issue #64 - skip meaningless chunk of 4 zero bytes between two
  113. otherwise-valid BIFF records
  114. - Github issue #61 - fix updating of escapement attribute of Font objects read
  115. from workbooks.
  116. - Implemented ``Sheet.visibility`` for xlsx files
  117. - Ignore anchors (``$``) in cell references
  118. - Dropped support for Python 2.5 and earlier, Python 2.6 is now the earliest
  119. Python release supported
  120. - Read xlsx merged cell elements.
  121. - Read cell comments in .xlsx files.
  122. - Added xldate_as_datetime() function to convert from Excel
  123. serial date/time to datetime.datetime object.
  124. Thanks to the following for their contributions to this release:
  125. - John Machin
  126. - Caleb Epstein
  127. - Martin Panter
  128. - John McNamara
  129. - Gunnlaugur Þór Briem
  130. - Stephen Lewis
  131. 0.9.2 (9 Apr 2013)
  132. ------------------
  133. - Fix some packaging issues that meant docs and examples were missing from the tarball.
  134. - Fixed a small but serious regression that caused problems opening .xlsx files.
  135. 0.9.1 (5 Apr 2013)
  136. ------------------
  137. - Many fixes bugs in Python 3 support.
  138. - Fix bug where ragged rows needed fixing when formatting info was being parsed.
  139. - Improved handling of aberrant Excel 4.0 Worksheet files.
  140. - Various bug fixes.
  141. - Simplify a lot of the distribution packaging.
  142. - Remove unused and duplicate imports.
  143. Thanks to the following for their contributions to this release:
  144. - Thomas Kluyver
  145. 0.9.0 (31 Jan 2013)
  146. -------------------
  147. - Support for Python 3.2+
  148. - Many new unit test added.
  149. - Continuous integration tests are now run.
  150. - Various bug fixes.
  151. Special thanks to Thomas Kluyver and Martin Panter for their work on
  152. Python 3 compatibility.
  153. Thanks to Manfred Moitzi for re-licensing his unit tests so we could include
  154. them.
  155. Thanks to the following for their contributions to this release:
  156. - "holm"
  157. - Victor Safronovich
  158. - Ross Jones
  159. 0.8.0 (22 Aug 2012)
  160. -------------------
  161. - More work-arounds for broken source files.
  162. - Support for reading .xlsx files.
  163. - Drop support for Python 2.5 and older.
  164. 0.7.8 (7 June 2012)
  165. -------------------
  166. - Ignore superfluous zero bytes at end of xls OBJECT record.
  167. - Fix assertion error when reading file with xlwt-written bitmap.
  168. 0.7.7 (13 Apr 2012)
  169. -------------------
  170. - More packaging changes, this time to support 2to3.
  171. 0.7.6 (3 Apr 2012)
  172. ------------------
  173. - Fix more packaging issues.
  174. 0.7.5 (3 Apr 2012)
  175. ------------------
  176. - Fix packaging issue that missed ``version.txt`` from the distributions.
  177. 0.7.4 (2 Apr 2012)
  178. ------------------
  179. - More tolerance of out-of-spec files.
  180. - Fix bugs reading long text formula results.
  181. 0.7.3 (28 Feb 2012)
  182. -------------------
  183. - Packaging and documentation updates.
  184. 0.7.2 (21 Feb 2012)
  185. -------------------
  186. - Tolerant handling of files with extra zero bytes at end of NUMBER record.
  187. Sample provided by Jan Kraus.
  188. - Added access to cell notes/comments. Many cross-references added to Sheet
  189. class docs.
  190. - Added code to extract hyperlink (HLINK) records. Based on a patch supplied by
  191. John Morrisey.
  192. - Extraction of rich text formatting info based on code supplied by
  193. Nathan van Gheem.
  194. - added handling of BIFF2 WINDOW2 record.
  195. - Included modified version of page breaks patch from Sam Listopad.
  196. - Added reading of the PANE record.
  197. - Reading SCL record. New attribute ``Sheet.scl_mag_factor``.
  198. - Lots of bug fixes.
  199. - Added ``ragged_rows`` functionality.
  200. 0.7.1 (31 May 2009)
  201. -------------------
  202. - Backed out "slash'n'burn" of sheet resources in unload_sheet().
  203. Fixed problem with STYLE records on some Mac Excel files.
  204. - quieten warnings
  205. - Integrated on_demand patch by Armando Serrano Lombillo
  206. 0.7.0 (11 March 2009)
  207. ---------------------
  208. + colname utility function now supports more than 256 columns.
  209. + Fix bug where BIFF record type 0x806 was being regarded as a formula
  210. opcode.
  211. + Ignore PALETTE record when formatting_info is false.
  212. + Tolerate up to 4 bytes trailing junk on PALETTE record.
  213. + Fixed bug in unused utility function xldate_from_date_tuple which
  214. affected some years after 2099.
  215. + Added code for inspecting as-yet-unused record types: FILEPASS, TXO,
  216. NOTE.
  217. + Added inspection code for add_in function calls.
  218. + Added support for unnumbered biff_dump (better for doing diffs).
  219. + ignore distutils cruft
  220. + Avoid assertion error in compdoc when -1 used instead of -2 for
  221. first_SID of empty SCSS
  222. + Make version numbers match up.
  223. + Enhanced recovery from out-of-order/missing/wrong CODEPAGE record.
  224. + Added Name.area2d convenience method.
  225. + Avoided some checking of XF info when formatting_info is false.
  226. + Minor changes in preparation for XLSX support.
  227. + remove duplicate files that were out of date.
  228. + Basic support for Excel 2.0
  229. + Decouple Book init & load.
  230. + runxlrd: minor fix for xfc.
  231. + More Excel 2.x work.
  232. + is_date_format() tweak.
  233. + Better detection of IronPython.
  234. + Better error message (including first 8 bytes of file) when file is
  235. not in a supported format.
  236. + More BIFF2 formatting: ROW, COLWIDTH, and COLUMNDEFAULT records;
  237. + finished stage 1 of XF records.
  238. + More work on supporting BIFF2 (Excel 2.x) files.
  239. + Added support for Excel 2.x (BIFF2) files. Data only, no formatting
  240. info. Alpha.
  241. + Wasn't coping with EXTERNSHEET record followed by CONTINUE
  242. record(s).
  243. + Allow for BIFF2/3-style FORMAT record in BIFF4/8 file
  244. + Avoid crash when zero-length Unicode string missing options byte.
  245. + Warning message if sector sizes are extremely large.
  246. + Work around corrupt STYLE record
  247. + Added missing entry for blank cell type to ctype_text
  248. + Added "fonts" command to runxlrd script
  249. + Warning: style XF whose parent XF index != 0xFFF
  250. + Logfile arg wasn't being passed from open_workbook to
  251. compdoc.CompDoc.
  252. 0.6.1 (10 June 2007)
  253. ---------------------
  254. + Version number updated to 0.6.1
  255. + Documented runxlrd.py commands in its usage message. Changed
  256. commands: dump to biff_dump, count_records to biff_count.
  257. 0.6.1a5
  258. -------
  259. + Bug fixed: Missing "<" in a struct.unpack call means can't open
  260. files on bigendian platforms. Discovered by "Mihalis".
  261. + Removed antique undocumented Book.get_name_dict method and
  262. experimental "trimming" facility.
  263. + Meaningful exception instead of IndexError if a SAT (sector
  264. allocation table) is corrupted.
  265. + If no CODEPAGE record in pre-8.0 file, assume ascii and keep going
  266. (instead of raising exception).
  267. 0.6.1a4
  268. -------
  269. + At least one source of XLS files writes parent style XF records
  270. *after* the child cell XF records that refer to them, triggering
  271. IndexError in 0.5.2 and AssertionError in later versions. Reported
  272. with sample file by Todd O'Bryan. Fixed by changing to two-pass
  273. processing of XF records.
  274. + Formatting info in pre-BIFF8 files: Ensured appropriate defaults and
  275. lossless conversions to make the info BIFF8-compatible. Fixed bug in
  276. extracting the "used" flags.
  277. + Fixed problems discovered with opening test files from Planmaker
  278. 2006 (http://www.softmaker.com/english/ofwcomp_en.htm): (1) Four files
  279. have reduced size of PALETTE record (51 and 32 colours; Excel writes
  280. 56 always). xlrd now emits a NOTE to the logfile and continues. (2)
  281. FORMULA records use the Excel 2.x record code 0x0021 instead of
  282. 0x0221. xlrd now continues silently. (3) In two files, at the OLE2
  283. compound document level, the internal directory says that the length
  284. of the Short-Stream Container Stream is 16384 bytes, but the actual
  285. contents are 11264 and 9728 bytes respectively. xlrd now emits a
  286. WARNING to the logfile and continues.
  287. + After discussion with Daniel Rentz, the concept of two lists of XF
  288. (eXtended Format) objects (raw_xf_list and computed_xf_list) has been
  289. abandoned. There is now a single list, called xf_list
  290. 0.6.1a3
  291. -------
  292. + Added Book.sheets ... for sheetx, sheet in enumerate(book.sheets):
  293. + Formatting info: extraction of sheet-level flags from WINDOW2
  294. record, and sheet.visibility from BOUNDSHEET record. Added Macintosh-
  295. only Font attributes "outline" and "shadow'.
  296. 0.6.1a2
  297. -------
  298. + Added extraction of merged cells info.
  299. + pyExcelerator uses "general" instead of "General" for the generic
  300. "number format". Worked around.
  301. + Crystal Reports writes "WORKBOOK" in the OLE2 Compound Document
  302. directory instead of "Workbook". Changed to case-insensitive directory
  303. search. Reported by Vic Simkus.
  304. 0.6.1a1 (18 Dec 2006)
  305. ---------------------
  306. + Added formatting information for cells (font, "number format",
  307. background, border, alignment and protection) and rows/columns
  308. (height/width etc). To save memory and time for those who don't need
  309. it, this information is extracted only if formatting_info=1 is
  310. supplied to the open_workbook() function. The cell records BLANK and
  311. MULBLANKS which contain no data, only formatting information, will
  312. continue to be ignored in the default (no formatting info) case.
  313. + Ralph Heimburger reported a problem with xlrd being intolerant about
  314. an Excel 4.0 file (created by "some web app") with a DIMENSIONS record
  315. that omitted Microsoft's usual padding with 2 unused bytes. Fixed.
  316. 0.6.0a4 (not released)
  317. ----------------------
  318. + Added extraction of human-readable formulas from NAME records.
  319. + Worked around OOo Calc writing 9-byte BOOLERR records instead of 8.
  320. Reported by Rory Campbell-Lange.
  321. + This history file converted to descending chronological order and
  322. HTML format.
  323. 0.6.0a3 (19 Sept 2006)
  324. ----------------------
  325. + Names: minor bugfixes; added script xlrdnameAPIdemo.py
  326. + ROW records were being used as additional hints for sizing memory
  327. requirements. In some files the ROW records overstate the number of
  328. used columns, and/or there are ROW records for rows that have no data
  329. in them. This would cause xlrd to report sheet.ncols and/or
  330. sheet.nrows as larger than reasonably expected. Change: ROW records
  331. are ignored. The number of columns/rows is based solely on the highest
  332. column/row index seen in non-empty data records. Empty data records
  333. (types BLANK and MULBLANKS) which contain no data, only formatting
  334. information, have always been ignored, and this will continue.
  335. Consequence: trailing rows and columns which contain only empty cells
  336. will vanish.
  337. 0.6.0a2 (13 Sept 2006)
  338. ----------------------
  339. + Fixed a bug reported by Rory Campbell-Lange.: "open failed";
  340. incorrect assumptions about the layout of array formulas which return
  341. strings.
  342. + Further work on defined names, especially the API.
  343. 0.6.0a1 (8 Sept 2006)
  344. ---------------------
  345. + Sheet objects have two new convenience methods: col_values(colx,
  346. start_rowx=0, end_rowx=None) and the corresponding col_types.
  347. Suggested by Dennis O'Brien.
  348. + BIFF 8 file missing its CODEPAGE record: xlrd will now assume
  349. utf_16_le encoding (the only possibility) and keep going.
  350. + Older files missing a CODEPAGE record: an exception will be raised.
  351. Thanks to Sergey Krushinsky for a sample file. The open_workbook()
  352. function has a new argument (encoding_override) which can be used if
  353. the CODEPAGE record is missing or incorrect (for example,
  354. codepage=1251 but the data is actually encoded in koi8_r). The
  355. runxlrd.py script takes a corresponding -e argument, for example -e
  356. cp1251
  357. + Further work done on parsing "number formats". Thanks to Chris
  358. Withers for the ``"General_)"`` example.
  359. + Excel 97 introduced the concept of row and column labels, defined by
  360. Insert > Name > Labels. The ranges containing the labels are now
  361. exposed as the Sheet attributes row_label_ranges and col_label_ranges.
  362. + The major effort in this 0.6.0 release has been the provision of
  363. access to named cell ranges and named constants (Excel:
  364. Insert/Name/Define). Juan C. Mendez provided very useful real-world
  365. sample files.
  366. 0.5.3a1 (24 May 2006)
  367. ---------------------
  368. + John Popplewell and Richard Sharp provided sample files which caused
  369. any reliance at all on DIMENSIONS records and ROW records to be
  370. abandoned.
  371. + If the file size is not a whole number of OLE sectors, a warning
  372. message is logged. Previously this caused an exception to be raised.
  373. 0.5.2 (14 March 2006)
  374. ---------------------
  375. + public release
  376. + Updated version numbers, README, HISTORY.
  377. 0.5.2a3 (13 March 2006)
  378. -----------------------
  379. + Gnumeric writes user-defined formats with format codes starting at
  380. 50 instead of 164; worked around.
  381. + Thanks to Didrik Pinte for reporting the need for xlrd to be more
  382. tolerant of the idiosyncracies of other software, for supplying sample
  383. files, and for performing alpha testing.
  384. + '_' character in a format should be treated like an escape
  385. character; fixed.
  386. + An "empty" formula result means a zero-length string, not an empty
  387. cell! Fixed.
  388. 0.5.2a2 (9 March 2006)
  389. ----------------------
  390. + Found that Gnumeric writes all DIMENSIONS records with nrows and
  391. ncols each 1 less than they should be (except when it clamps ncols at
  392. 256!), and pyXLwriter doesn't write ROW records. Cell memory pre-
  393. allocation was generalised to use ROW records if available with fall-
  394. back to DIMENSIONS records.
  395. 0.5.2a1 (6 March 2006)
  396. ----------------------
  397. + pyXLwriter writes DIMENSIONS record with antique opcode 0x0000
  398. instead of 0x0200; worked around
  399. + A file written by Gnumeric had zeroes in DIMENSIONS record but data
  400. in cell A1; worked around
  401. 0.5.1 (18 Feb 2006)
  402. --------------------
  403. + released to Journyx
  404. + Python 2.1 mmap requires file to be opened for update access. Added
  405. fall-back to read-only access without mmap if 2.1 open fails because
  406. "permission denied".
  407. 0.5 (7 Feb 2006)
  408. ----------------
  409. + released to Journyx
  410. + Now works with Python 2.1. Backporting to Python 2.1 was partially
  411. funded by Journyx - provider of timesheet and project accounting
  412. solutions (http://journyx.com/)
  413. + open_workbook() can be given the contents of a file instead of its
  414. name. Thanks to Remco Boerma for the suggestion.
  415. + New module attribute __VERSION__ (as a string; for example "0.5")
  416. + Minor enhancements to classification of formats as date or not-date.
  417. + Added warnings about files with inconsistent OLE compound document
  418. structures. Thanks to Roman V. Kiseliov (author of pyExcelerator) for
  419. the tip-off.
  420. 0.4a1, (7 Sept 2005)
  421. --------------------
  422. + released to Laurent T.
  423. + Book and sheet objects can now be pickled and unpickled. Instead of
  424. reading a large spreadsheet multiple times, consider pickling it once
  425. and loading the saved pickle; can be much faster. Thanks to Laurent
  426. Thioudellet for the enhancement request.
  427. + Using the mmap module can be turned off. But you would only do that
  428. for benchmarking purposes.
  429. + Handling NUMBER records has been made faster
  430. 0.3a1 (15 May 2005)
  431. -------------------
  432. - first public release