This is the changelog/release notes for the calamine crate.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Updated benchmarking to uses the
criterion.rscrate. This removed the requirement for using+nightlyforcargo bench. PR #620. -
Updated dependencies for release 0.34.0:
quick-xml: 0.38 -> 0.39. PR #617
-
Refactored CFB to resolve special case in the caller of
fn get_chain. PR #615. -
Performance improvements:
-
Fixed capitalized workbook/book stream handling in XLS files. PR #618.
-
Fixed issue where BIFF5
LblandExternSheetrecords were incorrectly parsed as BIFF8. PR #613. -
Fixed VBA
check_variable_recordto handle optional records. PR #614. -
Fixed premature error when BIFF version is not Biff8 in XLS files. PR #619.
-
Fixed issue where XLSX cells with an empty
<v/>value returned a string with index 0 instead of an Empty value. Issue #607. -
Fixed millisecond rounding issue where 1000 milliseconds weren't rounded up to the next second. Issue #602, PR #605.
- Added support for reading data from Pivot Tables, which involves reading data from the internal Pivot Cache. PR #559.
-
Update dependencies for release 0.33.0:
zip: 4.2.0 -> 7.0.atoi_simd: 0.16 -> 0.17
-
Fixed potential memory exhaustion issue in ODS files that could be triggered via repeated empty rows/columns.
The fix adds limits to prevent memory exhaustion from malicious ODS files that declare billions of repeated cells via
table:number-rows-repeatedandtable:number-columns-repeated attributes.The change adds the following protection layers:
- Add cap for columns per row at
MAX_COLUMNS(16,384). - Add cap for total row repeats at
MAX_ROWS(1,048,576). - Add cap for total cells at
MAX_CELLS(100 million) inget_range().
These limits match XLSX's existing row/column limits and prevent a 7KB malicious file from attempting to allocate memory for 17+ billion cells.
When MAX_CELLS is exceeded, return
OdsError::CellLimitExceededinstead of silently returning an empty range. This ensures callers are properly informed of truncation rather than receiving silent data loss. - Add cap for columns per row at
-
Fixed an issue where XLSX files with tables that had the internal
insertRowattribute set returned aDimensionsobject where the end row was less than the start row. This caused an assert/panic when trying to create aRangeobject to return the table range. Issue #589. -
Fixed an issue with XLSX files where worksheet tables used the unusual, but valid, absolute reference system like
"/xl/tables/table1.xml"instead of the common Excel generated relative system"../tables/table1.xml". Issue #587.
-
Refactored VBA reading functions to be on-demand for better performance.
-
Simplified
vba_project()function return type fromOption<Result<T>>toResult<Option<T>>for more idiomatic error handling. This is a breaking change.
-
Fixed out-of-memory vulnerabilities in XLS file parsing by bounding allocations.
-
Fixed and extended support for XLSX shared formulas with handling of ranges, absolute references, and column/row ranges in XLSX files.
-
Fixed XLSX issue with missing shared string sub-elements. Also improved error messages for shared string parsing issues.
-
Fixed acceptance of XLS
XLUnicodeRichExtendedStringrecords without reserved tags. -
Fixed various edge cases in XLS handling that could lead to parsing errors.
-
Upgraded
quick-xmlto v0.38. This was a significant change inquick-xmlrelative to v0.37 and required changes incalamineto entity handling. It also fixes EOL handling which may lead to regressions incalamineapplications if they expected to see"\r\n"in strings instead of the correct (for XML and Excel)"\n".For most users these will be inconsequential changes but please take note before upgrading production code.
-
Renamed the
"dates"feature flag to"chrono"since there is now some native date handling features without"chrono". The"chrono"flag is more specific and accurate. The"dates"flag is still supported as before for backward compatibility.This change also made some datatype methods related to date/times available in the
"default"feature set. They were previously hidden unnecessarily behind the "dates/"chrono" flag.
- Added a conversion function to
ExcelDateTimeto convert the inner serial Excel datetime to standard year, month, date, hour, minute, second and millisecond components. Works for 1900 and 1904 epochs.
-
Fixed issue where Excel xlsx shared formula failed if it contained Unicode characters. Issue #553.
-
Fixed issue where Excel XML escapes in strings weren't unescaped. For example
"_x000D_" -> "\r". Issue #469.
- Added
DebugandClonetoTablefor easier debugging. PR #547.
- Fixed issue Issue #548 for xls files where the
SSTrecord had an incorrect number of unique strings.
-
Unpinned the
zip.rsdependency from v4.2.0 to allow cargo to choose the correct version for the user's rustc version.The Rust MSRV was bumped to v1.75.0 (which it should have been for for
zip.rscompatibility in previous releases).See the discussion at Issue #527.
- Add additional documentation and examples for the
Range,Cell,XlsxErrorandTablestructs, andXlsxTable and Merge methods. Issue #459
-
Pin zip.rs to v4.2.0.
The current latest release of
zip.rs, v4.3.0, requires a MSRV of v1.85.0. This release pinszip.rsto v4.2.0 to allow users to maintain a MSRV of v1.73.0 for at least one more release. It is likely thatcalaminev0.30.0 or later will move back to the latestzip.rsv4.x and require rustc v1.85.0.
- Fixed issue where XLSX files had Windows style directory separators for internal paths instead of the required Unix style separators. Issue #530.
- Fixed several XLS parsing issues which could lead to out-of-memory errors. PR #525.
- Fixed numeric underflow in
Xlsx::from_sparse()and also ensured that the associatedRangeof cells would be in row-column order. PR #524.
- Bump zip to 4.0.
- (xls): add one more
Errorvariant related to formatting.
- Bump dependencies.
- (xls): Invalid formats parsing.
- Always parse string cell as string.
- Pin zip crate to 2.5.
- (xlsx): check 'closing' tag name with more prefixes.
- Sparse cells expect 0 index rows, even when using
header_row.
- Ability to merge cells from xls and xlsx.
- Options to keep first empty rows for xlsx.
- Support consecutive repeated empty cells for ods.
- New
header_rowconfig.
- Bump MSRV to 1.73.
- Fix broken links in README.
- Enable dates and pictures features in
docs.rsbuild. - Fix broken fuzzer.
- Add
is_errorandget_errormethods to theDataTypetrait. - Add deserializer helper functions.
- Support getting merged region.
Range::headersmethod.- Expose some
Dimensionsmethods.
- Use
OnceLockinstead ofonce_cellcrate (MSRV: 1.71).
- Use case insensitive comparison when searching for file in xlsx.
- Do not panic when reading cell format with invalid index.
- Introduce a
DataTypetrait implemented by bothDataandDataRef. DataandDataTypenow returnSome(0{.0})andSome(1{.0})rather thanNonewhen.as_i64or.as_f64is used on a Bool value.- Detect xlsb/ods password protected files.
- Introduce
is_xmethods for date and time variants.
- BREAKING: rename
DataTypeenum toDataandDataTypeReftoDataRef. - DateTime(f64) to DateTime(ExcelDateTime).
- Getting tables names from xlsx workbooks without
_relsfiles.
worksheet_formulanot returning all formula.
- New
DataTypeRefavailable fromworksheet_range_refto reduce memory usage. - Detect if workbook is password protected.
- Add benchmark plot.
- Truncated text in xls.
- Support label cells for xls.
- Update GitHub actions.
- Clippy.
- Preallocate several buffers.
- Regression on
Range::get. - Spelling of formula error type.
- Add support of sheet type and visibility.
- Implement blank string handling.
- Improve
de_opt_f64example. - Remove datetime notice from README.
- Clippy.
- Bump MSRV to 1.63 (breaking).
- Set edition to 2021.
- Formula with string not displaying properly.
- Bump MSRV to 1.60.0 due to log dependencies.
- Xls: formula values ignored.
- Xls: formula (string) not displayed properly.
- Support for duration.
- Add MSRV.
- (xlsx) support
rattribute. - Support
PROJECTCOMPATVERSIONin vba. - Incorrect date parsing due to excel bug.
- (all) parse format/style information to infer cell as datetime.
- (ods) support number-columns-repeated attribute.
- Bump dependencies.
- Multiple clippy refactorings.
- Extract picture data by turning
picturefeature on.
- Wrong range len calculation.
- Date precision.
- Always return sheet names in lexicographic order (
BTreeMap).
- Bump dependencies (quick-xml in particular and chrono).
- Remove travis.
- Several decoding issues in xls and xlsb.
- Wrong decimal parsing.
- Improve conversions from raw data to primitives.
- Replace macro matches! by match expression to reduce MSRV.
- Fix two typos in README.
- Allow empty value cells in xlsx.
- Obscure xls parsing errors (#195).
- Use
chunks_exactinstead of chunks where possible. - Detect date/time formatted cells in XLSX.
- Brute force file detection if extension is not known.
- Support xlsx sheet sizes beyond
u32::MAX.
- Add regression tests that fail with miri.
- Ensure doctest functions actually run.
- Run cargo fmt to fix travis tests.
- Make
to_u32,read_slicesafe and sound. - Security issue #199.
- Fix Float reading for XLSB.
- Add
deserialize_withexample in README. - Correct MBSC to MBCS in vba.rs (misspelled before).
- Use 2018 edition paths.
- Skip phonetic run.
- Fix XLS float parsing error.
- Add the ability to read formula values from XLSB.
- Support integral date types.
- Make
Metadata.sheets(andReader.sheet_names) always return names in workbook order.
- Fix warnings in tests.
- Deprecate failure and impl
std::error::Errorfor all errors. - Add
datesfeature to enrichDataTypewith date conversions functions.
- Update dependencies.
- Wrong bound comparisons.
- Improve deserializer.
- Bump dependencies.
- Add several new convenient fn to
DataType. - Add a
Range::rangefn to get sub-ranges. - Add a new
Range::cellsiterator. - Implement
DoubleEndedIteratorwhen possible. - Add a
Range::getfn (similar to slice's).
- Add some missing
size_hintimpl in iterators. - Add some
ExactSizeIterator.
- Consider empty cell as empty str if deserializing to str or String.
- Xls - allow sectors ending after eof (truncate them!).
- Codepage/
encoding_rsfor codepage mapping.
- Serde map do not stop at first empty value.
- Do not return map keys for empty cells. Fixes not working
#[serde(default)].
- Bump dependencies.
- Add a
RangeDeserializerBuilder::with_headersfn to improve serde deserializer.
- Ods, support text:s and text:p.
- Support
MulRkfor xls files.
- Bump dependencies.
- Properly parse richtext ods files.
- Ods: display sheet names in order.
- Handle 'covered cells' which are behind merge-cells in ODS.
- Bump dependencies.
- Boolean detection and missing repeated cells in ODS.
- Possibility of index out of bound in
get_valueand eventually in Index<(usize, usize)>.
- Have Range
start/endreturn None if the range is actually empty. - Have
Range::get_valuereturn an Option if the index is out of range.
- Make
Range::from_sparsepublic.
- Bump dependencies.
- Migrate from error-chain to failure.
- More documentation on error.
- Bump dependencies (calamine,
encoding_rsand zip). - Process any Read not only Files.
- Simplify Reader trait (enable direct Xlsx read etc ...).
- Always initialize at creation.
- Fix various typos.
- Update dependencies.
- Add serde deserialization.
- Update dependencies, in particular quick-xml 0.9.1.
- Bump dependencies.
- Add a bound check when decoding cfb.
- Bump dependencies.
- Ignore .bk files.
- Bump dependencies.
- Update to quick-xml 0.7.3 and
encoding_rs0.6.6.
- Implement
DisplayforDataTypeandCellTypeError. - Add a
CellTypealias trait.
- Update to quick-xml 0.7.1.
- Update
encoding_rsto 0.6.2. - Add benches and avoid clearing a buffer supposed to be reused.
- Add support for formula parsing/decoding.
- Make
Rangegeneric over its content.
- Convert codepage 21010 as codepage 1200.
- Support
EUC_KRencoding.
- Error while using a singlebyte encoding for xls files (
read_dbcs).
- Error while using a singlebyte encoding for xls files (
short_strings).
- Support defined names for named ranges.
- Better internal logic.
- Add Index/IndexMut for Range.
- Rename
ExcelinSheetsto accommodateOpenDocument.
- Add basic support for
OpenDocumentspreadsheets. - Force rustfmt on travis checks.
- Apply rustfmt.
- Update dependencies.
- Rustfmt.
- Extend appveyor paths to be able to use curl.
- Extract richtext reading from
read_shared_stringstoread_string. - Enable namespaced xmls when parsing xlsx files.
- Bump dependencies.
- Move from rust-encoding to
encoding_rs(faster), loses some decoders.
- Bump to quick-xml 0.6.0 (supposedly faster).
- Xlsx - support 'inlineStr' elements (
<is>nodes).
- Rustfmt the code.
- Bump dependencies (error-chain 0.8.1, quick-xml 0.5.0).
- Xlsx - support sheetnames prefixed with 'xl/' or '/xl/'.
- Adds a new
worksheet_range_by_indexfunction. - Adds new
ErrorKinds.
- Replace
try!with?operator. - Simplify
search_errorexample by using arun()function.
- Update dependencies (error-chain and byteorder).
- Update dependencies.
- (xls) preload vba only instead of sheets only.
- (vba) consume cfb in constructor and do not store cfb.
- (all) better
Rangeinitialization viaRange::from_sparse. - (all) several new fn in
Range(used_cells,start,end...).
- Adds a
range_eq!macro in tests.
- (xls) early exit if workbook is password protected.
- (xls) allow directory start to empty sector if version = 3.
- (vba) support all project codepage encodings.
- (xls) better decoding based on codepage.
- (xlsb) simplify setting values and early exit when stepping into an invalid
BrtRowHdr. - (xlsb) fix record length calculation.
- Add new methods for
Range:width,height,is_empty.
- Less
unwraps, no unused imports. - Range bounds is not (
start,end) instead of (position,size).
- (all) allow range to resize when we try to set a value out of bounds.
- (xls) better management of continue record for
rich_extended_strings.
- (all) return error when trying to set out of bound values in
Range. - (xls) do a proper encoding when reading cells (force 2 bytes unicode instead of utf8).
- (xls) support continue records.
- (all) allow empty rows iterator.
- Remove some development
println!.
- First release.