[0.2.3] - 2026-11-27
Changed
-
Parse workbook metadata and protection, worksheet metadata, relationship parts, and worksheet drawings in a single XML pass per part in
Xlsxrb.load, and reuse parsed workbook relationships, worksheet relationships, and threaded-comment person maps instead of re-reading those ZIP entries. -
Build XML parts in
Ooxml::Writer, itsDrawingXml,FeaturesXml, andStylesXmlmixins, andOoxml::Crypto::AgilethroughOoxml::XmlBuilder(ADR 0014), keeping string concatenation only for cell-loop and shared-string hot paths inOoxml::WorksheetWriterandOoxml::WorkbookWriter.
Fixed
-
Guard against oversized 64-bit stream sizes and truncated DIFAT sectors in
Ooxml::Cfb::Readerso corrupted CFB containers do not raiseRangeErrororNoMethodError. -
Wrap REXML unknown encoding name and encoding conversion errors as
Xlsxrb::ParseErrorinOoxml::XmlParser. -
Scrub invalid UTF-8 byte sequences in
Ooxml::SharedStringsParserandOoxml::WorksheetParserbefore XML entity unescaping and newline normalization. -
Scrub invalid UTF-8 bytes in ZIP entry names inside
Ooxml::ZipReaderinstead of raisingArgumentErrorduring case-insensitive catalog lookup. -
Set the ZIP UTF-8 language encoding flag (general purpose bit 11,
0x0800) inOoxml::ZipWriterandOoxml::ZipGeneratorwhen writing non-ASCII entry names so external ZIP readers decode UTF-8 filenames instead of treating them as raw bytes. -
Truncate fractional time portions in
Ooxml::Utils.serial_to_datesoCell#to_dateandStreamRow#values(type_cast: true)return exactDateinstances equal toDate.new(...)instead of carrying sub-day rational offsets. -
Pass
date1904: date1904?fromElements::Cell#formatted_valuetoNumberFormatter.formatso formatted dates and times on 1904-epoch workbooks do not shift by four years and one day. -
Apply the current definition of a redefined named column style to
DateandTimecells inStreamWriter#with_date_style_variantswhen the redefined style specifies a number format, matchingWorkbookBuilder. -
Parse self-closing
<is/>elements in inline string cells as empty strings inOoxml::WorksheetParser(each_row,fast_scan_row_values, andeach_event) so they matchOoxml::Reader::WorksheetListener. -
Preserve formula attributes (
type,ref,shared_index,calculate_always, and data-table flags) and expand shared formulas inOoxml::WorksheetParser,StreamRow,Xlsxrb.load, andXlsxrb.read, and emit self-closing<f t="shared" si="..."/>tags for shared formula slaves inOoxml::WorksheetWriter. -
Enforce
max_uncompressed_sizefor stored (method == 0) ZIP entries inOoxml::ZipReader#read_entryand#decompress, matchingEntryStreamIO. -
Skip single-quoted sheet names (
'Q1'!,'O''Reilly'!) and unquoted sheet prefixes before!(S1!,Q1!) inXlsxrb.expand_formulaso short or quoted sheet names matching cell-reference patterns are not shifted. -
Unwrap
<![CDATA[...]]>sections inOoxml::WorksheetParser.normalize_textand handle SAX2cdatacallbacks inOoxml::Reader::WorksheetListenerso inline string cells containing CDATA return their text content instead of literal CDATA markers or empty strings. -
Scrub invalid UTF-8 byte sequences before running the regex fallback in
Ooxml::RelationshipsParser.parse_allinstead of raisingArgumentError. -
Forward
Elements::Row#collapsed?into row attributes inOoxml::WorkbookWriterso collapsed row outlines built in memory or re-saved viato_dataemitcollapsed="1"matchingStreamWriter. -
Preserve per-series
:chart_typevalues read from combo charts inOoxml::Writer::DrawingXml#group_chart_seriesso re-saving a loaded workbook keepscomboChartseries types instead of collapsing them tobarChart. -
Emit an empty
<gradientFill/>element when gradient stops arenilor empty inOoxml::WorkbookWriter#build_styles_xmlinstead of raisingNoMethodError. -
Parse
<autoFilter>inside table XML inOoxml::Reader::TableListenerand preserve the presence or absence of table auto-filters when writing loaded workbooks inOoxml::WorkbookWriter#build_table_xml. -
Emit
colorFilter,iconFilter,hiddenButton,showButton,sortMethod, extrasortConditionattributes, andElements::SortState#conditionsinOoxml::WorksheetWriter#write_auto_filterand#write_filter_columnso filter columns and sort states surviveStreamWriteroutput andto_datare-saves. -
Preserve
falseboolean values inElements::Workbook#initialize,WorkbookBuilder#custom_properties, andStreamWriter#custom_propertiesinstead of falling throughv[:value] || v["value"]tonil. -
Share a single person table across worksheets when writing threaded comments in
Ooxml::WorkbookWriterand emit[Content_Types].xmloverrides forxl/threadedComments/threadedComment*.xmlfrom the sheet list so multi-sheet threaded comments do not leave danglingpersonIdreferences andStreamWriteremits valid content types. -
Synchronize
_xlnm.Print_Areaand_xlnm.Print_Titlesdefined names and drop staleunmapped_datametadata inElements::Workbook#withso edits to worksheet print settings, defined names, or workbook metadata persist acrossto_dataandXlsxrb.write. -
Register inline Hash style definitions passed in
cell_stylesinStreamWriter#row(including date and time format variants) so streaming rows apply inline cell styles identically toWorkbookBuilder. -
Deduplicate conditional formatting differential formats (
dxfs) againstElements::StylesinOoxml::WorkbookWriterso identical rules across sheets or repeated writes share a singledxfIdmatchingStreamWriter. -
Clear incompatible fill properties in
StyleBuilderwhen switching between solid, pattern, and gradient fills so stale gradient or pattern keys do not persist intostyles.xml. -
Return an unfrozen empty string from
Ooxml::ZipReader::EntryStreamIO#read(0)instead of raisingFrozenErrorwhen forcing encoding on a frozen string literal. -
Number chart parts sequentially across sheets and mixed image/chart drawings in
Ooxml::WorkbookWriterso workbooks with charts on multiple sheets or alongside images do not emit duplicatexl/charts/chart1.xmlentries or mismatched[Content_Types].xmloverrides. -
Chain multiple directory, FAT, and DIFAT sectors in
Ooxml::Cfb::Writerso encrypted workbooks and CFB containers larger than 63 KB or holding more than three streams can be read back. -
Populate
Elements::Column#collapsed?and#best_fit?inWorksheetBuilder#column,Xlsxrb.load,StreamSheet#columns, andStreamSheet#load, and forward both flags when writing built workbooks inXlsxrb.write. -
Preserve existing row or column ranges when
WorksheetBuilder#print_titlesis called with onlyrows:orcolumns:, keepStreamWriter#print_titlessynchronized after partial updates, and escape single quotes in sheet names when building and parsing_xlnm.Print_Titlesand_xlnm.Print_Areadefined names. -
Return
"Infinity","-Infinity", or"NaN"instead of raisingFloatDomainErrorwhen formatting a non-finiteFloatwith a"General", empty,nil, or over-length format code inNumberFormatter.formatandXlsxrb.format_value, and preserve the format code’s string encoding when splitting format sections. -
Stop double-escaping chart
frame_macroattributes, Hash chart title text, DrawingML colorvalattributes, and threaded comment persondisplayName,userId, andproviderIdattributes, which escaped values containing&,<,>, or"twice.
Security
-
Escape non-String formula cached values, Hash cell values with an explicit type, VML comment anchors, and app property heading-pair counts when writing them as XML element content.
[0.2.2] - 2026-11-23
Added
-
Add
Xlsxrb.truncate_cell_text, which cuts text to what a cell holds: 32,767 characters counted in UTF-16 code units, as Excel counts them (ADR 0011). A character is never split, so 20,000 emoji become 16,383.strict_excel_moderaisesArgumentErrorfor longer text; callers that want to keep the start of the text instead can call this for every cell. Text of 32,767 bytes or fewer is returned as is without being counted.
Deprecated
-
encryption_mode: :standardinXlsxrb.writeis deprecated and warns; passencryption_mode: :agile(ADR 0013). Standard encryption is AES-128 in ECB mode with no check that the file is unchanged, and Agile encryption, which Excel 2010 and later open, is AES-256 with one. In version 0.3.0:standardraisesArgumentError, and a password withoutencryption_mode:writes Agile encryption instead of Standard; that change of default gives no warning. Files with either scheme are still read. -
Passing xlsx data as a String to
Xlsxrb.loadandXlsxrb.readis deprecated and warns; pass a stream, as inXlsxrb.load(StringIO.new(data))(ADR 0012). A String is read as data when it looks like xlsx data and as a file path otherwise, so a program that passes on an uploaded workbook as a String can be made to open a file on the server. In version 0.3.0 a String is always a file path.
Security
-
Check the HMAC of a file encrypted with Agile encryption when reading it, and raise
Xlsxrb::DecryptionErrorif the encrypted package does not match it or the file has none. The HMAC was not read at all, so a file changed after it was encrypted could be read without an error. Files written by xlsxrb 0.2.1 and earlier, whose HMAC was computed differently (see Fixed), are still read and checked against that HMAC. -
Raise
Xlsxrb::ZipErrorfor a ZIP entry whose declared size runs past the end of the archive, inXlsxrb.load,Xlsxrb.read, andOoxml::ZipReader. The size was passed toIO#readas the length to read: a 150-byte file declaring 4 GB made Ruby allocate over 1 GB before failing withErrno::EINVAL, and a ZIP64 size of 2**62 raisedNoMemoryError, whichrescue StandardErrordoes not catch. -
Stop holding the inflated data of every entry in memory when reading an archive that has no central directory and uses data descriptors. Each entry is inflated to find where it ends, and the output was kept until the reader was closed, so
max_uncompressed_size(500 MB by default) bounded one entry but not their total: a 2 MB file could hold 2 GB. Such an entry is now inflated once to measure it, without keeping the output, and again when it is read. ItsEntry#compressed_sizeandEntry#crc32now hold the compressed size and the CRC-32 from the data descriptor instead of the uncompressed size and 0. -
Raise
Xlsxrb::Errorfor an encrypted file (CFB) whose DIFAT lists the same FAT sector more than once. Every listing loaded the sector again, so a 529 KB file given toXlsxrb.loadwith a password used 1.2 GB, and the use grew in proportion to the file. -
Raise
Xlsxrb::DecryptionErrorfor Agile encryption whosehashSizediffers from the digest length. The password check compared onlyhashSizebytes, sohashSize="0"accepted any password; the package was then decrypted with the wrong key into unusable bytes rather than reported as a wrong password. -
Stop reading a String given to
background_image=as a file path (ADR 0012). A String that named an existing file was replaced by that file’s bytes, which were written into the workbook as the background image without being checked to be an image. A program that passed on an uploaded image as a String could be given text such as/srv/app/config/secret.txtand would put that file into the workbook it returned. A String is now always the image itself. To use a file, pass its bytes:sheet.background_image = { data: File.binread(path), ext: "jpg" }. This changes a documented behavior in a patch release, as the deprecation policy allows for severe harm; callers that passed a path get a background that is not an image until they change the call. -
Raise
ArgumentErrorwhen writing an image or background image whoseextis not 1 to 10 letters and digits. The extension was written as given into the ZIP entry name, the relationship target, and[Content_Types].xml, so an extension taken from an uploaded file name, such aspng/../../../evil, produced the entryxl/media/image1.png/../../../evil, and one containing"/>added relationships to the drawing’s relationship part. -
Raise
Xlsxrb::ZipErrorfromOoxml::ZipWriterfor entry names that are empty, start with/, contain a..segment, a backslash, or a control character. A program that extracts the archive could write such an entry outside its target directory. -
Escape the
refand shared index of array and shared formulas, a row’soutline_level, thetintof rich text colors, and theid,parent_id, andtimestampof threaded comments when writing them as XML attributes. A value containing"ended the attribute, so the rest of the value was written as further attributes or elements. A threaded commentidread from a file was written back the same way. -
Escape every option value written as an XML attribute by the workbook, styles, drawing, chart, table, and pivot table writers, and the font options of rich text. More than 500 values were written as given, among them a chart data point
idx, a pivot table source range,ref, andsubtotal, and a rich text fontsize,underline,vert_align, and colortheme. A value containing"ended the attribute, so the rest of it was written as further attributes or elements, and one containing<or&made the part not well-formed. Custom document properties of type:number,:float, and:dateare escaped as text in the same way. Values without these characters are written as before. -
Escape the
refandtypeof a cell given toOoxml::WorksheetWriter#write_rowas a Hash. They were written into therandtattributes of the cell as given, so a value containing"could add attributes or elements to the worksheet. The builder and the stream writer do not pass these keys, so only a caller of the private writer was affected. -
Write a style id into the
sattribute of a row or cell only when it is an Integer.Ooxml::WorksheetWriterwrote the value it found in the style map as given, so a map holding a String containing"could add attributes or elements to the worksheet. The builder and the stream writer fill the map with Integers, so only a caller of the private writer was affected. -
Remove characters that XML 1.0 cannot hold, such as U+0001 and U+FFFE, from attribute values and text written through
Ooxml::XmlBuilder: hyperlink targets and tooltips, table and column names, defined names, headers and footers, data validation messages, number formats, and document properties. One such character made the part not well-formed, so the file could not be opened. Cell text is unchanged; it keeps these characters as_xHHHH_. -
Fix
Xlsxrb.load,StreamSheet#hyperlinks, andStreamSheet#loadnever returning for a sheet in which the wordhyperlinkappears outside a tag after<hyperlinks>, as in<hyperlinks>hyperlink</hyperlinks>. The scan returned to the same position forever, and with arefattribute on the enclosing tag it also added an entry on every pass until memory ran out. -
Read date format codes that contain
%as literal text inCell#formatted_value,Row#formatted_values, andXlsxrb.format_value. The%reachedTime#strftimeas a directive, so a format code such asyyyy%999999dproduced 1 MB of text per cell, and a 3.5 KB file could ask for 1 GB from one call. -
Raise
Xlsxrb::ParseErrorfor XML parts whose elements nest more than 256 levels deep. REXML’s SAX2 parser takes time proportional to the depth for every tag: 20,000 nested elements (a 2.5 KB file) took 15 seconds inXlsxrb.readandXlsxrb.load, and 40,000 took 58 seconds. -
Raise
Xlsxrb::ParseErrorfor a row whose last<c>or<is>start tag has no end tag. The cell pattern searched to the end of the row once for each such tag, so a row of 40,000 unclosed<c>tags (a 3 KB file) took over 100 seconds to read. A<c>start tag without an end tag was read as an empty cell before. -
Read shared strings in time proportional to the part. An
<si>without<t>, and a<t>in a string table that has<rPh>elements, each searched the rest of the part, so 100,000 empty<si>elements (a 4 KB file) took over 60 seconds before the first sheet was read. -
Find streamed rows in time proportional to the sheet when a row, or markup between rows, spans many chunks. Each 64 KB chunk searched the whole buffer again: 16 MB of elements whose names start with
row(a 27 KB file) took over 60 seconds, and that buffer had no size limit. Rows and tags over 50 MB now raiseXlsxrb::ParseErroron every path (it wasArgumentError, for unclosed rows only). -
Raise
Xlsxrb::ParseErrorfor a row number above 1,048,576, Excel’s last row. The number was built digit by digit into an Integer of any size (400,000 digits took over 20 seconds), andpad_empty_rows: trueyielded one empty row for every number below it. -
Read cell values of more than 400 characters as text, or raise
Xlsxrb::ParseErrorwhen the cell is typed as a number, instead of converting them to a number. Converting 16 million digits (an 18 KB file) to an Integer took over 20 seconds. Shorter values are read as before. A shared string index that is negative or longer than 10 digits reads as an empty string instead of the last string orRangeError. -
Stop
StreamSheet#dimension,#row_range, and#column_rangeafter the first 1 MB of a sheet that has neither<dimension>nor<sheetData>. They searched everything read so far again for each chunk, so a 16 MB sheet (a 19 KB file) took 19 seconds. -
Format numbers as General for format codes longer than 1,024 characters (Excel accepts 255). The time to format grows with the code for every cell that uses it.
-
Require rexml 3.4.2 or later (was
~> 3.0), the first version without the denial of service in parsing XML that has multiple XML declarations (CVE-2025-58767). Earlier 3.x versions have further known denial-of-service advisories. -
Raise
ArgumentErrorfor a chart seriestypethat is not a known chart type and for a shape color transform whosetypeis not a DrawingML color transform. Both are written as element names: a series type was written as given, so one containing>added elements to the chart part, and a transform type was only escaped as text. Thevalof a transform and the alpha of a color are escaped as attribute values.
Fixed
-
Write the HMAC that the specification describes ([MS-OFFCRYPTO] 2.3.4.14) for
encryption_mode: :agile: over the encrypted package, with its key and value encrypted under the package key. It was computed over the package before encryption and encrypted under keys derived from the password, so a reader that checks the HMAC found every such file changed. Excel 16.115 for Mac and Apache POI 5.2.5 open files written either way. -
Read an encrypted file whose last sector is shorter than a sector. Excel 2007 ends some files where the last stream ends, without padding; the short sector was dropped, so the encrypted package came out truncated and decryption failed with
Xlsxrb::DecryptionError. -
Read a file with Standard encryption that has bytes after the encrypted package. Only the blocks that hold the package are decrypted now; trailing bytes that were not a whole AES block made decryption fail. A package shorter than its declared size raises
Xlsxrb::DecryptionErrorinstead of being returned truncated. -
Raise
Xlsxrb::ZipErrorfor corrupt deflate data and for compression methods other than stored and deflate. These raisedZlib::DataErrororZlib::BufError, which code that rescuesXlsxrb::Errordoes not catch, and reading an entry with an unsupported compression method throughZipReader#open_entry_ioreturned no data without an error. An archive that ends inside a local file header no longer raisesNoMethodError. -
Replace invalid UTF-16 in a part with U+FFFD instead of raising
Encoding::InvalidByteSequenceError. -
Raise
Xlsxrb::DecryptionErrorfor encrypted packages with salts, keys, or ciphertext of the wrong length or invalid Base64. These raisedOpenSSL::Cipher::CipherErrororArgumentError, which code that rescuesXlsxrb::Errordoes not catch. -
Raise
Xlsxrb::ParseErrorfor malformed XML and exceeded entity expansion limits in a part, instead ofREXML::ParseExceptionandRuntimeError. Code that rescuesRuntimeErrorfor these no longer catches them. -
Return the General form when formatting Infinity or NaN, or a date serial number outside Excel’s range, with a format code, instead of raising
FloatDomainErrororArgumentError. -
Decode each XML entity once in cell text, formulas, and attribute values. The predefined entities were decoded before the numeric ones, so
&#60;, which is the text<, was read as<, and&lt;written as&lt;was read as<as well. -
Read encrypted files stored as version 4 compound files, which have 4,096-byte sectors. The first sector was taken to start 512 bytes into the file, as in version 3, instead of 4,096, so no stream was found and decryption failed.
-
Read bytes that are not UTF-8 in an XML part as U+FFFD.
Xlsxrb.load,StreamSheet#dimension, and reading relationships raisedArgumentError, andXlsxrb.readreturned cell text that was not valid UTF-8, which raised when it was written or matched. A part that is not well-formed because of such bytes raisesXlsxrb::ParseError. -
Read a cell style index or a parent style (
xfId) outside the style table as no style. One too large for a machine word raisedRangeErrorinCell#formatted_valueandRow#formatted_values, and a negativexfIdtook the parent counted from the end of the table. -
Raise the decryption error for an encrypted workbook given as a stream. An error while decrypting, such as
Xlsxrb::InvalidPasswordErrorfor a wrong password, was discarded, and reading went on to raiseXlsxrb::ZipErrorfor the encrypted bytes. A String source was not affected.
[0.2.1] - 2026-11-16
Changed
-
Write styled cells faster in
Xlsxrb.writewith a block (StreamWriter). Writing 50,000 rows of 10 cells with every cell styled takes longer than writing them unstyled by 48% with arow_style(0.2.0: 131%), 45% with onecell_stylesname (148%), 89% with a per-columncell_stylesarray (217%), and 45% with column styles (198%), on Ruby 4.0 without YJIT. With YJIT the differences are 49%, 49%, 76%, and 35% (120%, 142%, 195%, and 223%). Each figure is the fastest of three processes that each run one case seven times and take the median. The written files are unchanged. -
Build and write styled cells faster with
Xlsxrb.buildandXlsxrb.write(target, workbook). Building and writing the same rows with every cell styled takes longer than unstyled rows by 4% with arow_style(0.2.0: 40%), 13% with onecell_stylesname (41%), 20% with a per-columncell_stylesarray (44%), and 7% with column styles (40%), on Ruby 4.0 without YJIT. With YJIT the differences are 18%, 20%, 41%, and 25% (46%, 46%, 41%, and 49%). Unstyled rows also build and write in 25% less time than in 0.2.0, and 37% less with YJIT.Xlsxrb.buildcreates each cell once, with its style index, instead of creating it with the style name first. The built workbooks and written files are unchanged. -
WorkbookBuilder#sheetandWorkbookBuilder#[]return aDeferredWorksheetinstead of anElements::Worksheet. It answers the same methods with the same results, and builds the worksheet the first time one of them is called or when it is frozen.is_a?(Elements::Worksheet)is false for it, and its RBS type changed. This breaks the rule that patch releases keep public APIs compatible; it is made in 0.2.1 as an exception, because returning a built worksheet would create every cell of the sheet twice. -
WorksheetBuilder#row,#<<,#skip_rows, and#group_rowswith row indexes raiseXlsxrb::Errorafter the sheet’s block ends, instead of ignoring the rows.
Deprecated
-
Using the sheet that
WorkbookBuilder#sheetandWorkbookBuilder#[]return (DeferredWorksheet) is deprecated and warns on first use; read sheets from the workbook thatXlsxrb.buildreturns. In version 0.3.0,WorkbookBuilder#sheetwill return the sheet’sWorksheetBuilder, andWorkbookBuilder#[]will return theWorksheetBuilderof an existing sheet (ADR 0010). -
Adding a sheet with
WorkbookBuilder#[]is deprecated and warns when the call is given a name or an index, or no argument after a sheet was added; useWorkbookBuilder#sheet. In version 0.3.0,#[]will look sheets up asStreamWriter#[]does: it will return theWorksheetBuilderof an existing sheet, or of the current sheet without an argument, and raise for a sheet that does not exist.w[0]now adds a sheet named"0". -
Using the value that
stylereturns, onXlsxrb.buildandXlsxrb.writewriters and their sheets, is deprecated and warns on first use; configure the style with options or in the block given tostyle. In version 0.3.0,stylewill returnnil. The returned value (ReturnedStyleBuilder) still changes the style. Changing a style after cells use it styles those cells differently inXlsxrb.buildandStreamWriter. -
Changing a sheet setting that
StreamWriterwrites at the start of the sheet after rows of the sheet are written is deprecated and warns:column,freeze_pane,split_pane,selection,sheet_view,sheet_format,sheet_properties,outline_properties,tab_color=,code_name=,fit_to_page=, andpage_setupwithfit_to_widthorfit_to_height. Make these settings before the first row. Such a setting applies only while the first rows are held back, and is dropped without an error once about 64 KB of rows are written. In version 0.3.0, it will raiseXlsxrb::Error. -
Looking up a sheet that does not exist with
StreamWriter#[]is deprecated and warns; create sheets withStreamWriter#sheet. In version 0.3.0, it will raiseArgumentError. Writing to such a sheet already raisesXlsxrb::Error. -
In version 0.3.0,
StreamWriter#sheetwill return the sheet’s writer (WorksheetProxy) instead of its name, asWorkbookBuilder#sheetwill return the sheet’sWorksheetBuilder. A return value cannot be checked when it is used, so this does not warn. Code that looks the sheet up by the returned name, as inw[w.sheet("A")], can use the returned writer instead. -
WorksheetBuilder#buildis deprecated and warns; it will be private in version 0.3.0. -
In version 0.3.0, cells built by
Xlsxrb.buildwill change as follows.Cell#format_codewill be the number format of the cell’s resolved style, as in a loaded workbook; it is now set only for styles defined on the sheet with a String name, and only as the format was when the row was added. Cells styled:defaultor:nonewill have style index 0 instead of the name. A style index given incell_styleswill be kept only inCell#style_index, not also inCell#style.
Fixed
-
Count cell text and sheet names in UTF-16 code units for Excel’s limits (32,767 and 31), as Excel does (ADR 0011). Characters outside the Basic Multilingual Plane, such as emoji, count as two. Counting Unicode characters let
strict_excel_modewrite files that Excel repairs, such as a cell with 16,384 emoji or a sheet name with 16.Elements::Worksheet.valid_name?andvalidatecount the same way, andDslHelpers.sanitize_sheet_namecuts a name to 31 code units without splitting a character. -
Raise
ArgumentErrorfor cell text longer than 32,767 characters inStreamWriterwithstrict_excel_mode(the default), asXlsxrb.builddoes. The check never ran, so such text was written and Excel cut it when repairing the file. Withstrict_excel_mode: falseit is written as before. -
Write cell text that looks like an
_xHHHH_escape, and characters that XML 1.0 cannot hold, so that Excel andXlsxrb.loadread the text back as written, in all writers."_x0041_"was read back as"A", because the leading underscore was not written as_x005F_, and characters such as U+0001 and U+FFFE were dropped; they are now written as_x0001_and_xFFFE_. Shared strings, inline strings, rich text runs, and cached formula strings are encoded this way (ECMA-376ST_Xstring). -
Return
nilfromrow,skip_rows, andgroup_rowsinXlsxrb.buildandStreamWritersheets, as documented.Xlsxrb.buildreturned its internal list of rows fromrow, and both modes returned the next row index fromskip_rowsand the block’s value or the row indexes fromgroup_rows. -
Report a sheet that was never created when writing to it through
StreamWriter#[]. The error said that the sheet was no longer active, as for an earlier sheet. -
Write negative integers with their value in
StreamWriterrows that have a row style, height, or other row attribute, or in sheets with column styles. Unstyled cells in such rows took the value from a lookup table indexed from its end, so-1was written as65535. -
Give
DateandTimecells without a cell style the default date and date-time number formats inStreamWriterrows that have a row style, height, or other row attribute, and in sheets with column styles (#9). A cell that inherits a row or column style without a number format gets a variant of that style with the date format, as a cell style already did, so it keeps the style’s font, fill, and border. These cells were written without a number format, so Excel showed the serial number. -
Write values that claim to be a
Timethroughis_a?without being one, such asActiveSupport::TimeWithZone, as date-times with their own wall clock, inXlsxrb.buildandStreamWriter.case/whendid not match them asTime, so they were written as text inside a number cell, which Excel repairs.Xlsxrb.buildkeeps them asTimevalues with the same wall clock. -
Give
DateandTimecells without a cell style, inXlsxrb.buildrows that have a row style or in sheets with column styles, a variant of the inherited style with the default date or date-time format, asStreamWriterdoes. These cells were given the default format alone, so they lost the row or column style’s font, fill, and border. -
Leave the
cell_stylesArray given toWorksheetBuilder#rowinXlsxrb.buildunchanged. ADateorTimecell without a style wrote the default date style into the caller’s Array, so the next row given the same Array got that date style in the same column. -
Keep the threaded comments of styled cells in the workbook that
Xlsxrb.buildreturns. Those cells lostCell#threaded_commentswhen their style names were resolved. Written files were not affected, because threaded comments are written from the sheet’s list. -
Raise
ArgumentErrorwhen a Hash given tocell_styles:has a style option as a key or a value that is not a style, as incell_styles: { bold: true }. Such a Hash maps columns to styles, so{ bold: true }was read as column BOLD and failed with a column-limit error, and{ b: true }was ignored. The message shows how to give inline styles. -
Give
DateandTimecells inStreamWriterrows the date variant of their style’s current definition. After a style was defined again withstyle, its date cells kept the variant made from the earlier definition. -
Style the cells of
Xlsxrb.buildwith the definition a style had when each row, or column style, was added, asStreamWriterdoes. A style defined again later, in the workbook or in any sheet, changed the cells of every sheet, including rows added before it. A style used before any definition still takes its first definition. -
Write the Playground
quick_start,sales_report, andsheet_propertiespreset formulas withs.formula(...). Since 0.2.0 plain strings starting with=are written as text, so these presets showed=D12and similar strings instead of computed values. -
Write the formulas in the Visual Gallery
sheet_propertiesexample withs.formula(...), so its second sheet shows computed totals instead of=SUM(...)text. -
Render Japanese text in the Playground’s LibreOffice preview. The ZetaOffice build ships no CJK font, so Japanese characters showed as boxes, including in the
japanese_textpreset.rake fetch_assetsnow downloads Noto Sans JP Regular and Bold (SIL Open Font License 1.1, license published next to the fonts), and the Playground installs them before LibreOffice starts.
[0.2.0] - 2026-11-10
Upgrading from 0.1.x: see docs/UPGRADING-0.2.md.
Added
-
Add
show_sheet_tabs?,full_calc_on_load?, andrefresh_all?boolean predicates onElements::WorkbookProperties. -
Add
core_properties=andapp_properties=assignment setters onWorkbookBuilder,StreamWriter, andStreamWriter::WorksheetProxy. -
Add
namereader onStreamWriter::WorksheetProxyto mirrorWorksheetBuilder#name. -
Value object delegators (
formula,array_formula,shared_formula,rich_text,hyperlink,comment,cell_error) onWorkbookBuilder, and (formula,array_formula,shared_formula,rich_text,cell_error) onWorksheetBuilder,StreamWriter, andStreamWriter::WorksheetProxy. -
Expose
:style_indexas a canonicalData.definemember onElements::Row. -
Add
columns0-argument reader onWorksheetBuilder,StreamWriter, andStreamWriter::WorksheetProxyreturning an array ofElements::Column, and onTableBuilderreturning an array ofElements::TableColumn. -
Add
sheet_protection=assignment setter onWorksheetBuilder,StreamWriter, andWorksheetProxyacceptingElements::SheetProtection,Hash,Boolean, ornil. -
Add
print_titles=assignment setter onWorksheetBuilder,WorkbookBuilder,StreamWriter, andWorksheetProxyacceptingElements::PrintTitles,Hash, ornil. -
Add value object members for data that the reader already parsed but the value objects dropped:
CoreProperties#language,WorkbookProperties#update_links,WorkbookProtection#revisions_algorithm_name,#revisions_hash_value,#revisions_salt_value, and#revisions_spin_count,PageSetup#page_order,#horizontal_dpi, and#vertical_dpi,TableColumn#data_cell_style,Font#vert_align,ThreadedComment#provider_id, andFilterColumn#blankand#custom_filters_and. -
Add
Elements::FilterColumn.from_spec(column_id, spec)andFilterColumn#to_specto convert between filter column value objects and thefilter_columnhash format (type: :filters,:custom,:dynamic,:top10,:color_filter, or:icon_filter).
Changed
-
Unify property configuration methods across
WorksheetBuilder,WorkbookBuilder,StreamWriter, andWorksheetProxy(sheet_properties,sheet_view,sheet_format,print_options,workbook_properties,core_properties,app_properties) to pure 0-argument getters returning value objects/hashes and keyword argument mutators returningvoid(nil). -
Unify single-value property accessors (
print_area,auto_filter) acrossWorksheetBuilder,StreamWriter,WorksheetProxy, andWorkbookBuilderto 0-argument getters and dedicated=assignment setters. -
Unify boolean 0-argument getters to
?predicate methods across builders:TableBuilder(#show_row_stripes?,#show_column_stripes?,#show_first_column?,#show_last_column?,#totals_row?,#auto_filter?),DataValidationBuilder(#allow_blank?,#show_input_message?,#show_error_message?),ConditionalFormatBuilder(#bold?,#italic?,#stop_if_true?,#above_average?,#equal_average?,#percent?,#bottom?),ChartBuilder(#plot_visible_only?,#show_legend_key?),ChartBuilder::SeriesBuilder(#smooth?),WorksheetBuilder/StreamWriter/WorksheetProxy(#fit_to_page?), andWorkbookBuilder/StreamWriter(#show_sheet_tabs?). -
Normalize structured metadata methods (
page_setup,page_margins,header_footer,sheet_protection,freeze_pane,split_pane,selection,sort_state,outline_properties,print_titles) acrossWorksheetBuilder,StreamWriter,WorksheetProxy, andWorkbookBuilderto return their current immutable Value Object (ornil/Hash) when invoked with 0 arguments, and returnvoid(nil) when called with configuration arguments. -
Change
TableBuilder#columnto returnvoid(nil) instead of an internal column definition hash. -
Separate internal pipelines of
Xlsxrb.readandXlsxrb.load:Xlsxrb.readparses minimal streaming metadata directly yieldingStreamSheetinstances, whileXlsxrb.loadmaterializesElements::Worksheetdirectly without allocating intermediateStreamSheetinstances or double-validating. -
Make
Elements::Cellfully immutable by freezing instances upon instantiation inCell#initializeandCell.fast_create. -
Restrict
Elements::Workbook#sheets,#sheet,#[],#each, and#active_sheetsignatures toElements::Worksheetinstances only. -
Rename
Elements::Styles#num_fmttonumber_format_code. -
Rename
Elements::Dxfmember and keyword:num_fmtto:number_format. -
Rename
Elements::SheetPropertiesmember and keyword:page_setup_prto:page_setup_properties. -
Unify
StyleBuildersingle-attribute methods to dedicated 0-argument getters (font_size,font_name,font_color,underline,vert_align,fill_color,align_horizontal,align_vertical,text_rotation,indent,number_format) and assignment setters (font_size=,font_name=, etc.), and 0-argument boolean predicates (bold?,italic?,strike?,underline?,wrap_text?,shrink_to_fit?,locked?,hidden?,superscript?,subscript?) with assignment setters (bold=,italic=, etc.). -
Return frozen
Elements::IgnoredErrorvalue objects fromWorksheetBuilder#ignored_errors,StreamWriter#ignored_errors, andStreamWriter::WorksheetProxy#ignored_errors. -
Encapsulate internal methods by making
StyleBuilder#resolve_colorandStreamSheet#auto_filter_dataprivate. -
Update blockless
Xlsxrb.readto return anEnumerator[StreamSheet, void]with managed zip container lifecycle; useXlsxrb.loadfor in-memory random access. -
Update
WorkbookBuilder#sheetandStreamWriter#sheetparameter signatures with explicit keyword argumentsstate: nil, tab_color: nil, code_name: nil. -
Update
StyleBuilder#borderandStyleBuilder#alignmentparameter signatures with explicit keyword arguments. -
Synchronize
RubyLsp::Xlsxrb::CompletionListenercompletion items with the canonical v0.2.0 API. -
Unify
Xlsxrb.array_formulasignature to remove optional positionalrefin favor of keywordref:. -
Rename
Elements::FilterColumnmember:col_idto:column_id. -
Rename
Elements::WorkbookPropertiesmember:active_tabto:active_sheet, and renameElements::Workbook#active_tabto#active_sheet_index. -
Unify
Elements::Worksheetconstructor parametersheet_calc_pr:tosheet_calc_properties:and simplify#withto canonical keyword arguments. -
Change the default ZIP deflate level from zlib’s default (6) to 1, exposed as
Xlsxrb::DEFAULT_COMPRESSION_LEVELand used whencompression_levelis omitted ornil. Writes are 17 to 43% faster and files 5 to 41% larger in the measurements of ADR 0009; passcompression_level: 6for the previous output. -
Raise
Xlsxrb::ParseErrorwhenXlsxrb.readorXlsxrb.loadopens a ZIP archive without a workbook part, such as an OpenDocument spreadsheet renamed to.xlsx. It was read as a workbook without sheets. -
Raise
Errno::ENOENT(orErrno::EISDIR) whenXlsxrb.readorXlsxrb.loadgets a String that is neither XLSX or encrypted file content nor an existing file, instead of parsing the path itself as ZIP content and raisingZipError: Invalid magic number. Byte strings that are not an XLSX archive still raiseZipError. -
Raise
ArgumentErrorfor style options thatstyledoes not know (for examplebolt: trueorsize:instead offont_size:), with a suggestion for the closest valid key, and for a nested group given together with its flat keys (font: { size: 14 }, bold: true). These options were silently ignored. -
Raise
ArgumentErrorwhen a cell, row, or column refers to a style name that was never defined, with a suggestion for the closest defined name. Such cells were silently written unstyled.:defaultand:none, style indexes, and styles defined later in anXlsxrb.buildblock are still accepted. -
Raise
ArgumentErrorfor keyword arguments that anElementsvalue object does not know, innewandwith, including key names that 0.1.x accepted and ignored (for exampleFreezePane.new(col: 1),Font.new(sz: 11), orHyperlink.new(ref: "A1")). Unknown keys were silently dropped, so a typo or an old name lost the value without an error. The message names the member to use for an old key name, or suggests the closest member for a typo. An old key name given together with its member (as in hashes read from files, which carry both) is dropped.Chart,ConditionalFormat,ConditionalFormatRule,PivotTable,Shape,SortState,SparklineGroup, andTablestill collect other keys in theiroptionsmember. -
Raise
ArgumentErrorfor border styles that are not border style names, with a suggestion for the closest one, for example"slantedDashDot"forslantDashDot. The style was written as given, which Excel does not accept. -
Lower the minimum required Ruby version from 4.0 to 3.4, and replace the Ruby 4.0-only
Array#rfindin the drawing reader withreverse_each.find.
Removed
-
Remove dead private helper
Xlsxrb.write_workbook. -
Remove legacy
unmapped_datafallbacks for:style_indexinElements::Row#initialize, and:style_index,:style,:best_fit, and:collapsedinElements::Column#initialize. -
Hide non-
?boolean member reader methods on all 28Elements::MetadataRecordData.defineclasses andElements::Formula#calculate_always. -
Remove singular property mutators (
sheet_property,workbook_property,core_property,app_property) across builders in favor of unifiedsheet_properties,workbook_properties,core_properties, andapp_properties. -
Remove dual getter/setter
value = OMITTEDparameter branches and non-?boolean getter methods (bold,italic,strike,wrap_text,shrink_to_fit,locked,hidden,superscript,subscript) fromStyleBuilder. -
Remove
WorkbookBuilder#hyperlinkandWorkbookBuilder#commentdelegators (use top-levelXlsxrb.hyperlinkandXlsxrb.comment). -
Remove legacy table key fallbacks (
:total_row_formula,:total_formula,:total_row,:total_row_count) inDslHelpersand writers in favor of:totals_row_formula,:totals_row, and:totals_row_count. -
Remove legacy rule
:sizefallback inDslHelpers.extract_dxf_from_rule!(retaining:font_size). -
Remove legacy duplicate keys (
from_col/to_col,col:,col_fields:,dest_ref:,active_tab:,cols:,col_breaks:,si:) across builders and writers in favor of canonical keys (from_column/to_column,column:,column_fields:,destination:,active_sheet_index:,columns:,column_breaks:,shared_index:). -
Remove in-memory
#closeonElements::WorkbookandElements::Worksheet, and remove#loadonElements::Worksheet(StreamSheet#closeandStreamSheet#loadremain intact). -
Remove asymmetric legacy methods on
StreamSheet:#sheet_views,#first_column_index,#last_column_index,#legacy_drawing, and#ext_lstin favor of#sheet_viewand#column_range. -
Remove
Xlsxrb._read_workbookandElements::Workbook#_load. -
Remove deprecated alias
DslHelpers.sheet_namein favor ofDslHelpers.sanitize_sheet_name. -
Remove unused private cell serialization methods
build_raw_cell,build_row_attrs, andself.build_raw_cell_from_valueinlib/xlsxrb.rb. -
Remove empty
Xlsxrb::Utilsmodule andlib/xlsxrb/utils.rb. -
Remove positional offset arguments and
col_delta:keyword fromXlsxrb.expand_formula, unifying the signature todef self.expand_formula(formula, from_ref: nil, to_ref: nil, row_delta: nil, column_delta: nil). -
Remove singular
column:androw:keyword arguments fromdefined_nameacrossWorkbookBuilder,WorksheetBuilder,StreamWriter, andWorksheetProxy(unified tocolumns:androws:), and alignDslHelpers.normalize_defined_name_value. -
Remove
show_symbols:keyword argument fromoutline_propertiesacrossWorksheetBuilder,StreamWriter, andWorksheetProxy(unified toshow_outline_symbols:). -
Remove non-predicate boolean getters across builders:
TableBuilder(#show_row_stripes,#show_column_stripes,#show_first_column,#show_last_column,#totals_row,#auto_filter),DataValidationBuilder(#allow_blank,#show_input_message,#show_error_message),ConditionalFormatBuilder(#bold,#italic,#stop_if_true,#above_average,#equal_average,#percent,#bottom),ChartBuilder(#plot_visible_only,#show_legend_key),ChartBuilder::SeriesBuilder(#smooth),WorksheetBuilder/StreamWriter/WorksheetProxy(#fit_to_page),WorkbookBuilder/StreamWriter(#show_sheet_tabs), and non-predicate#escape_formulasreaders onWorkbookBuilder,WorksheetBuilder,StreamWriter, andWorksheetProxyin favor of their?predicate equivalents. -
Remove workbook-level delegation methods and stream-lifecycle helpers (
active_sheet,active_sheet=,first_sheet,first_sheet=,show_sheet_tabs,show_sheet_tabs=,tab_ratio,tab_ratio=,workbook_property,workbook_protection,core_property,app_property,custom_property,properties,default_font,sheet_names,cleanup!,internal_sheet_setup) fromStreamWriter::WorksheetProxyto establish full method symmetry withWorksheetBuilder. -
Remove positional argument setters from
ChartBuilderandSeriesBuilderin favor of pure 0-argument getters, dedicated=assignment setters,title(**kwargs), keyword dictionary methods (legend(**kwargs),plot_area(**kwargs), etc.), andseries(**kwargs, &block). -
Remove
#[],#[]=, and:infallback fromDataValidationBuilderandDslHelpers.normalize_data_validation. -
Remove
#[],#[]=,formulas,formulas=, and fallbacks for:sizeand:format_idfromConditionalFormatBuilder. -
Remove
number_format_idandnumber_format_id=fromStyleBuilderin favor ofnumber_formatandnumber_format=. -
Remove duplicate and ambiguous keys in
StyleBuilder#font(retaining:name,:size,:color,:vert_align) and top-levelStyleBuilder#apply_options!(retaining:font_name,:font_size,:font_color,:vert_align,:number_format). -
Remove all remaining deprecated builder methods and aliases across
WorkbookBuilder,WorksheetBuilder,StreamWriter, andStreamWriter::WorksheetProxy: -
Removed
set_default_font,active_tab,active_tab=,protect_workbook,protect_sheet,validate_data,select_cell,page_break_row,page_break_col,add_row,skip_row,group_column,group_cols,group_col,group_row,outline_pr,add_sparkline,add_comment,add_threaded_comment,background_picture,background_picture=,picture,picture=,add_protected_range,add_cell_watch,ignore_error,add_ignored_error,sheet_calc_pr,sheet_calc_pr=,calc_pr,calc_pr=,phonetic_pr,phonetic_pr=. -
Removed
ChartBuilder#secondary_axis,ChartBuilder#secondary_axis=, andSeriesBuilder#secondary_axis. -
Removed deprecated methods on
StyleBuilder:size,size=,sz,sz=,num_fmt,num_fmt=,num_fmt_id,num_fmt_id=. -
Removed deprecated methods on
TableBuilder:add_column,total_row,total_row=,total_row_count,total_row_count=. -
Removed deprecated methods on
DataValidationBuilder:range,range=,col,col=,row,row=,in,in=,error,error=,prompt,prompt=. -
Removed deprecated methods on
ConditionalFormatBuilder:range,range=,col,col=,row,row=,format_id,format_id=,size,size=,sz,sz=. -
Removed dual getter/setter argument branches across builders (
active_sheet,first_sheet,show_sheet_tabs,tab_ratio,code_name,fit_to_page,tab_color,sheet_calc_properties,phonetic_properties,background_image,state,auto_filter,print_area), strictly enforcing zero-argument getters and dedicated arity-1 assignment setters (xxx=). -
Removed deprecated keyword arguments:
styles:andstyle:onrow(usecell_styles:androw_style:); coordinate kwargsrow:,col_start:,col_end:,row_start:,row_end:onmerge(usemerge(range));from_col:andto_col:onimageandshape(usefrom_column:andto_column:);default_col_width:,base_col_width:, andoutline_level_col:onsheet_format(usedefault_column_width:,base_column_width:,outline_level_column:);cols:onprint_titles(usecolumns:);col:,ref_sheet:, andlocal:ondefined_name(usecolumn:andscope:);col:andexcept_col:ondata_validation,conditional_format, andignored_error(usecolumns:andexcept_columns:);si:onFormula(useshared_index:). -
Remove
StreamWriter#shared_stringsreader method in favor ofshared_strings?. -
Remove constant
Xlsxrb::MAX_COLin favor ofXlsxrb::MAX_COLUMN. -
Remove
Xlsxrb::Error::DIV0..VALUEcell error constants on the exception class in favor ofElements::CellError::*. -
Remove
Elements::RichTextRun#szin favor offont_size. -
Replace the
top_rowandleft_columnmembers ofElements::FreezePaneandElements::SplitPanewithtop_left_cell. Neither member was read or written. -
Remove the
escape_formulas:option ofXlsxrb.write,Xlsxrb.build,StreamWriter,WorkbookBuilder, andWorksheetBuilder, with itsescape_formulas?andescape_formulas=accessors. It was passed down to the worksheet writer but never used: output was identical with and without it. Strings are always written as text cells, which Excel does not evaluate as formulas, with or without the option. -
Remove deprecated
Xlsxrb.modify,Elements::Workbook#update_sheet, andElements::Worksheet#update_cellin favor of streaming transformations (Xlsxrb.read+Xlsxrb.write) or template generation viaXlsxrb.write. -
Remove Hash-like access (
#[],#key?,#dig,#fetch,#merge, and== Hash) onElements::MetadataRecordvalue objects andElements::Hyperlink#[]in favor of direct reader method calls and#to_h. -
Remove deprecated methods on
Elements::Row:pad_empty_cells(usepadded),cells_hash(usecells),formulas(useformula_expressions), and bare boolean queries (hidden,custom_height,collapsedin favor of?-suffixed predicates). -
Remove deprecated methods on
StreamRow:to_h(usevaluesorcells),formulas(useformula_expressions), and bare boolean queries (hidden,custom_height,collapsedin favor of?-suffixed predicates). -
Remove deprecated methods on
Elements::Cell:content(usevalue),column_index,column_letter,parse_ref,date1904(usedate1904?),link?(usehyperlink?), andthreaded_comments?(usethreaded_comment?). -
Remove keyword argument
date1904:onCell#to_dateandCell#to_time. -
Remove deprecated
StreamSheet#cellandElements::Worksheet#cellin favor of coordinate bracket access (sheet[...]). -
Remove deprecated
StreamSheet#first_rowandStreamSheet#last_rowin favor ofrow_rangeordimension_bounds. -
Remove deprecated
CoordinateAccess#cells_hash,first_column,first_col,last_column,last_col, andcell_value. -
Remove deprecated
Elements::Image#cellandcell_ref(useref),from_col(usefrom_column), andto_col(useto_column). -
Remove remaining deprecated aliases, duplicate Data members, and initialization fallbacks across
Elements::*Value Objects: -
Remove duplicate
Data.definemembers::colsfromElements::PrintTitles(use:columns),:colfromElements::FreezePane(use:column),:first_tabfromElements::WorkbookProperties(use:first_sheet),:outline_prfromElements::SheetProperties(use:outline_properties),:rel_id,:ext, and:filenamefromElements::BackgroundImage(use:r_id,:extension,:path), and:locationfromElements::PivotTable(use:ref). -
Remove
Elements::RichTextRun#[]andother.is_a?(Hash)branches fromElements::Hyperlink#==,Elements::CustomProperty#==, andElements::Styles#==. -
Remove non-predicate formula aliases on
Elements::Formula:always_calculate_array,assign_to_name,data_table_2d, anddata_table_rowin favor of predicate methods (?). -
Remove
Elements::Column#letterin favor of canonicalcolumn_letter. -
Remove
Elements::Styles#format_codein favor ofnumber_format. -
Remove
StreamSheet#_loadin favor ofStreamSheet#load. -
Remove deprecated
conditional_formatting:andcol_breaks:keyword arguments inElements::Worksheet#initializein favor ofconditional_formats:andcolumn_breaks:. -
Remove legacy keyword arguments and aliases on element Value Objects:
SheetFormat(default_col_width,outline_level_col,base_col_width),FilterColumn(hidden_button:),PageBreak(manual:),Comment(cell:andalias cell ref),ThreadedComment(cell:,person_id:,dt:,timestamp:,done:, andalias done resolved),DataValidation(show_dropdownandshow_dropdown?),ConditionalFormatRule(format_idandalias formulas formula),TableColumn(data_formula:andalias data_formula calculated_column_formula),Sparkline(location_ref,location,data_ref,f,data),SparklineGroup(display_empty,max,min),Chart(rid,chart_type,from_col,to_col),HeaderFooterImage(rid,ext,filename),Font(sz),Fill(pattern), andCellXf(number_format_id). -
Remove deprecated
Elements::Worksheet#dimension=(usewith(dimension: ...)),Elements::Worksheet#with_images, andStreamSheet#with_images. -
Remove deprecated
Elements::Worksheet#conditional_formattingandStreamSheet#conditional_formattingin favor ofconditional_formats. -
Remove deprecated
Elements::Styles#add_xf,add_num_fmt, andnum_fmtsin favor ofadd_cell_xf,add_number_format, andnumber_formats. -
Remove deprecated
Elements::Styles#xf,num_fmt,format_code_for,classification_for, andsz. -
Remove deprecated
Xlsxrb::Utilscoordinate and date conversion methods (col_name_to_index,col_index_to_name,ref_to_row_col,row_col_to_ref,parse_range,range_to_ref,date_to_serial,serial_to_date,serial_to_time,time_to_serial,split_coordinate,valid_excel_date?,expand_formula,datetime_to_serial) in favor of canonicalXlsxrb.*entry points. -
Remove deprecated transitional top-level aliases on
Xlsxrb:datetime_to_serial,serial_to_datetime,color_to_hex,sheet_name,stream, andformat(useXlsxrb.format_value). -
Remove deprecated transitional aliases
to_workbookonWorkbook,to_worksheetonWorksheetandStreamSheet,each_sheetonWorkbook, andcol_breaksonWorksheetandStreamSheet. -
Remove non-predicate boolean queries on element readers (
trim_empty_rows,pad_empty_rows,pad_empty_cells,fit_to_page,show_sheet_tabs,full_calc_on_load) in favor of?-suffixed methods (trim_empty_rows?,pad_empty_rows?,pad_empty_cells?,fit_to_page?,show_sheet_tabs?,full_calc_on_load?).
Fixed
-
Write the pattern type of cell fills in
Xlsxrb.buildand inXlsxrb.writeof loaded workbooks. The styles writer read:patternwhileElements::Fillnames it:pattern_type, so every fill was written withpatternType="none"and cell fill colors did not show. -
Protect the workbook with
workbook_protection(password:).Elements::WorkbookProtectionhad nopasswordmember, so the password was dropped and the workbook was written without one. A plain-text password is now hashed with SHA-512, as forsheet_protection, and a 4-digit hexadecimal value is written as the legacyworkbookPassword.Xlsxrb.loadalso keeps the hash, revision lock, and revisions password attributes of<workbookProtection>, which it dropped, so thatXlsxrb.writewrites them back. -
Keep filter column conditions in
Elements::Worksheet#filter_columnsandStreamSheet#filter_columns. Hashes in thefilter_columnformat (type:,values:,operator:, …) were passed toElements::FilterColumn.new, which dropped those keys, so the readers returned empty filter columns andXlsxrb.writeof value objects wrote an<autoFilter>without its conditions. -
Write threaded comments built from
Elements::ThreadedCommentwith theircreated_attime andresolvedstate; the writer only looked at thedt/timestampanddonekeys. -
Write the
horizontalDpiandverticalDpiattributes of page setup when they are positive; the schema requires at least 1. -
Keep the pattern type of differential format fills loaded from
styles.xml(Elements::Dxf#fill). The styles reader names itpattern:, whichElements::Filldropped. -
Wrap keyword arguments with double splat in Data.define constructors across Elements to prevent heap corruption and segfaults in CRuby 4.0 Ractors.
-
Keep the top-left cell of freeze and split panes.
freeze_pane(top_left_cell:)and the reader both used atop_left_cellthatElements::FreezePaneandElements::SplitPanedid not have, so the value objects dropped it and the writer always wrote the cell just past the frozen rows and columns; the reader also did not readtopLeftCellfor frozen panes. -
Keep the time of day of
DateTimevalues.Xlsxrb.date_to_serial,Xlsxrb.time_to_serial, and cell values written byXlsxrb.writeandXlsxrb.buildtreatedDateTime(a subclass ofDate) as a date, dropping the time and applying the date-only format. They now handle it likeTime. -
Write worksheets whose
selectionis an Array, one selection per pane, asElements::Worksheetaccepts.Xlsxrb.writecalledto_hon the Array and raisedTypeError. -
Link each sheet that
Xlsxrb.writestreams from a block to its own drawing, comments, threaded comments, tables, and pivot tables. Part numbers restarted at 1 for every sheet, so the relationships of later sheets pointed to the parts of the first sheet that had them, and the second sheet showed the first sheet’s images, comments, and tables. -
Write each image of a sheet to its own media file. Every image in a drawing was written as
xl/media/imageN.pngwith the drawing’s number, so a sheet with two or more images produced duplicate ZIP entries and one picture for all of them. -
Read the name, location, and cache ID of pivot tables saved by Excel 2010 and later. The
x14:pivotTableDefinitionthat such files keep inextLstreplaced the pivot table the reader had collected. -
Resolve pivot table fields given by name, such as
row_fields: ["Region"], throughfield_names:, and acceptfield:(a name or an index) in data fields. Names were written as is, as in<field x="Region"/>andfld="", which is invalid. A name withoutfield_names:, or one missing from it, raisesArgumentError. -
Write workbooks loaded with pivot tables. Loaded pivot tables carry their source, field names, and shared items in
cache, but the writer looked for the builder’ssource_refandfield_names, soXlsxrb.writeraisedNoMethodError; a pivot table on a sheet namedSheet1also raisedArgumentError: sheet already exists. Loaded pivot tables are now written from their cache definition, including sources that name a table, with typed shared items (<n>,<b>,<m>). As for pivot tables built withpivot_table, the cache is written withrefreshOnLoad, so Excel rebuilds it from the source data; the item order and other layout details of the original pivot table are not kept. -
Write the
szelement of differential format fonts beforecolorandname, in the order ofCT_Font. -
Keep the cell style formats (
cellStyleXfs) and named cell styles (cellStyles, such as Normal and Heading 1) of loaded workbooks. The writer always wrote one default style format and no named styles, so cell formats that referred to other style formats pointed to missing entries. -
Keep the chart type of loaded charts. The reader returns the chart element name (
"lineChart"), which the writer did not recognize, so every loaded chart was written as a bar chart. -
Raise
ArgumentErrorwhenXlsxrb.writegets anElements::Workbookwithout sheets, asXlsxrb.buildandStreamWriterdo, instead of writing a workbook with an empty<sheets>element, which is invalid. -
Keep the built-in unit of chart display units (
val_axis_disp_units) whose label has a fill, line, or number format. Reading the label replaced the unit with a hash that had only the label. -
Write the children of chart series in schema order:
spPrfirst, theninvertIfNegative,marker, orexplosion, thendPt. Series with a fill or line together with one of the others, or with data points, were invalid. -
Give pivot table row and column fields without
items:an<items>list with the default subtotal item. Excel for Mac crashed when it opened a pivot table whose axis fields had no items. -
Keep the table style of loaded tables. The reader returns the style as a hash, which
Elements::Worksheetwrapped as the style name, soXlsxrb.writewrote<tableStyleInfo name="{name: ...}">and Excel repaired the table;StreamSheet#tablesdropped the style. -
Write pivot fields with
defaultSubtotal="0"without the default subtotal item, and keep thefirstHeaderRow,firstDataRow, andfirstDataColof a loaded pivot table’s location instead of writing 1 for each. Excel repaired loaded pivot tables whose fields turned off the default subtotal. Loaded pivot tables are written without page field counts, since their page fields are not written. -
Leave sheets unprotected when their
<sheetProtection>element has nosheetattribute, which defaults to false. The reader leftsheetunset and the writer treated that as protected, soXlsxrb.writeof a loaded workbook protected such sheets. -
Keep the
familyandschemeof fonts loaded fromstyles.xml. -
Keep comments that are shown permanently instead of on hover. The VML drawing always hid them and the reader did not read
<x:Visible/>;commentonWorksheetBuilderandStreamWriternow takevisible:, andElements::Comment#visible?is read from and written to the VML drawing. -
Keep the position and size of comment boxes. The VML writer placed every box next to its cell and the reader did not read
<x:Anchor>, so loaded comments that were shown permanently moved and could overlap.Elements::Comment#anchorholds the eight<x:Anchor>integers;nilkeeps the default box next to the cell. -
Decode entity references such as
&and"in attribute values read from files, including number format codes, hyperlink display texts, tooltips, and locations, and table column names. REXML’s SAX2 parser passes attribute values as written, so a loaded format such as"$"#,##0read back as"$"#,##0andXlsxrb.writewrote it as&quot;$&quot;#,##0, changing the format. -
Keep gradient fills.
Elements::Fillhad no member for a<gradientFill>, soXlsxrb.loaddropped the gradients of a workbook and wrote such fills as empty pattern fills, andXlsxrb.buildwithfill_gradientraisedArgumentError.Elements::Fill#gradientholds the gradient type, degree, sides, and stops. -
Write
firstSliceAngandholeSizein doughnut charts, 0 and 50 unless given; doughnut charts without them did not validate. -
Write sheet tab colors given by name, such as
tab_color: :red, as aRGB hex. The name was written asrgb="red", which is not a valid color. An unknown name raisesArgumentError. -
Write workbooks loaded from files with rich-text comments, such as comments that Excel starts with the author’s name in bold.
MetadataRecord#to_hcalledEnumerable#to_hon theElements::RichTexttext ofElements::Comment, soXlsxrb.writeraisedTypeError.to_hnow keepsRichTextvalues as they are. -
Write workbooks loaded from files whose
docProps/app.xmllistsHeadingPairs, as files saved by Excel do.MetadataRecord#to_hcalledto_hon the[name, count]pairs ofAppProperties#heading_pairs, soXlsxrb.writeraisedTypeError. -
Keep the date or time number format on
DateandTimecell values that are given a cell style without anumber_format(for examplecell_styles: [:bold]). The style replaced the automaticyyyy-mm-ddformat, so Excel showed the serial number. Such cells now get a variant of their style that adds the default format, in bothXlsxrb.writeblocks andXlsxrb.build. -
Inherit
sheet_formatdefault_column_widthas the width of columns that definestyle:withoutwidth:. The column writer still looked up the removeddefault_col_widthkey and dropped the width. -
Raise
ArgumentErrorwhenrows:orcolumns:ondata_validationandconditional_formatreach outside the Excel grid (for examplerows: 1..Xlsxrb::MAX_ROW, which is one past the last 0-based row) instead of writing an invalid reference such asA2:A1048577. -
Keep the REXML entity expansion limits that the application set before
require "xlsxrb". Loading xlsxrb resetREXML::Security.entity_expansion_limitandentity_expansion_text_limitto the REXML defaults, which undid hardening such as an application setting the limit to 0 to disable entity expansion. -
Keep reading entries after one that ends with a data descriptor when
ZipReaderfalls back to walking local headers (an archive without a readable central directory). Ruby’sZlib::Inflatedrops input past the end of the deflate stream, so the reader skipped over the following entries; it now rewinds by the compressed length, and reads 8-byte sizes from the data descriptor of ZIP64 entries. -
Build cells in streaming and in-memory reads with one direct initializer instead of an
instance_variable_setcall per attribute, which had grown from 7 to 14 calls per cell since 0.1.10. A 1,000,000-cell streaming read is about 12% faster. -
Take the
r,s, andtcell attributes from the cell scanning regex when they appear in that order, as Excel and xlsxrb write them, instead of three more regex lookups per cell (other orders still fall back to those lookups), and stop copying cell values that need no whitespace stripping or re-encoding. A 1,000,000-cell streaming read is about 16% faster and allocates 43% fewer objects. -
Check cell reference digits with plain byte comparisons instead of
Comparable#between?, and yield cells instead of calling a block Proc, in the cell scanning loops (about 3% faster streaming reads). -
Consume inflated ZIP entry data by offset instead of
slice!, which moved the rest of each inflated chunk on every read, and stop re-encoding chunks that are already binary. Streaming reads run half as many garbage collections. -
Write ZIP64 records when an entry size, a file offset, or the entry count exceeds the 32-bit (16-bit for counts) ZIP fields. Sizes were truncated to 32 bits, so a worksheet whose XML exceeded 4 GiB uncompressed produced a corrupt XLSX without an error. Archives below these limits are written unchanged, except that entries streamed to unseekable output are declared ZIP64 up front, because their size is unknown when the local header is written.
ZipReaderalso reads the ZIP64 end of central directory record. See ADR 0008.
[0.1.18] - 2026-11-07
Added
-
Add Value Object factory delegator methods (
formula,array_formula,shared_formula,rich_text,comment,cell_error,hyperlink) acrossWorkbookBuilder,WorksheetBuilder,StreamWriter, andStreamWriter::WorksheetProxy. -
Add canonical coordinate conversion facade methods
Xlsxrb.parse_ref,Xlsxrb.cell_to_ref,Xlsxrb.column_index, andXlsxrb.column_letter. -
Add
Xlsxrb.format_valueas the canonical value formatting method. -
Add
Xlsxrb.time_to_serial(andUtils.time_to_serial) for converting Time/Date objects to Excel numeric serial numbers. -
Add
Xlsxrb::MAX_COLUMNconstant (16,384) representing the maximum column count supported by Excel / OpenXML. -
Support passing nested bounding coordinate arrays
[[top_row, left_col], [bottom_row, right_col]](as returned byparse_range) toXlsxrb.range_to_ref. -
Support
column_delta:keyword inXlsxrb::Utils.expand_formula. -
Support
ref:keyword argument inXlsxrb.array_formulaand includeElements::CellErrorincached_value:types. -
Support
new_password:and writer/reader option forwarding inXlsxrb.modify, and return the block result. -
Define Ractor-shareable frozen
Elements::CellErrorconstants (DIV0,NA,NAME,NULL,NUM,REF,VALUE,GETTING_DATA) onElements::CellError. -
Add canonical cell-level and row-level style keywords
cell_styles:androw_style:acrossWorksheetBuilder#row,StreamWriter#row, andStreamWriter::WorksheetProxy#row. -
Expose
:style_indexas a canonicalData.definemember onElements::Row. -
Add
style:keyword toElements::Cell.newandElements::Worksheet#update_cellfor style names and inline style definitions. -
Add 1-based
row_rangeandcolumn_rangeboundaries toElements::Worksheet(viaCoordinateAccess) andStreamSheet(from sheet dimension bounds), returning idiomaticRange[Integer]boundaries. -
Support 2D coordinate indexing
sheet[row, col]and letter column indexingsheet[row, "A"]onElements::WorksheetandCoordinateAccess. -
Add
columnandcolumnsbuilder methods acrossWorksheetBuilder,StreamWriter, andWorksheetProxywith unified options. -
Support 0-based page break indices (
row_breaks,column_breaks) across builders and readers. -
Add
Elements::WorkbookProperties#active_sheetandElements::Workbook#active_sheet_index. -
Add
Elements::FilterColumn#column_id. -
Add structured Hash access for
category_axisandvalue_axistitles onElements::Chart. -
Add dedicated assignment setters returning assigned value (
active_sheet=,first_sheet=,show_sheet_tabs=,tab_ratio=,code_name=,fit_to_page=,tab_color=,phonetic_properties=,sheet_calc_properties=,background_image=,totals_row=,totals_row_count=,state=,print_area=,print_titles=) acrossWorkbookBuilder,WorksheetBuilder,StreamWriter, andStreamWriter::WorksheetProxy. -
Add zero-argument property getters across builders and
StyleBuilder. -
Add predicate methods (
bold?,italic?,strike?,wrap_text?,shrink_to_fit?,locked?,hidden?,superscript?,subscript?) and assignment setters (font=,fill=,border=,vert_align=,superscript=,subscript=,wrap_text=,shrink_to_fit=,locked=,hidden=,protection=,number_format=) onStyleBuilder. -
Re-affirm
totals_row,totals_row=,totals_row_count, andtotals_row_count=as canonical onTableBuilderto align with ECMA-376totalsRowCount. -
Promote reader metadata to immutable Data value objects across
Elements::Styles,Elements::Workbook, andElements::Cell. -
Add
Elements::Styles#number_format_code(id). -
Support Symbol sheet lookup in
Elements::Workbook#sheetandElements::Workbook#[]. -
Freeze
Elements::Cellinstances on instantiation (initializeandfast_create). -
Return frozen
Array[Elements::IgnoredError]fromWorksheetBuilder#ignored_errors,StreamWriter#ignored_errors, andWorksheetProxy#ignored_errors. -
Add XML element existence guards for
merged_cells,data_validations,conditional_formatsonStreamSheet. -
Establish four-pillar I/O architecture:
Xlsxrb.read,Xlsxrb.write,Xlsxrb.load, andXlsxrb.build. -
Direct worksheet materialization in
Xlsxrb.loadwithout intermediateStreamSheetallocations. -
Support on-demand zip reopen after close in
Ooxml::ZipReader. -
Clarify
@api privateonOoxml::Reader,Ooxml::Writer, andOoxml::ZipGenerator.
Changed
-
Update
Elements::Row#[]andStreamRow#[]to resolve column indices and column letters viacell_atinstead of indexing the raw sparsecellsarray, returningnilwhen a cell at the specified column is absent. -
Separate builder getter (
xxx) and setter (xxx=) methods, allowing explicitnilresets. -
Encapsulate
StyleBuilder#resolve_colorasprivate. -
Encapsulate
StreamSheet#auto_filter_dataasprivate. -
Make
Xlsxrb._read_workbookprivate_class_method.
Deprecated
-
DslHelpers.sheet_nameis deprecated in favor ofDslHelpers.sanitize_sheet_name; will be removed in version 0.2.0. -
Positional
pos_refinXlsxrb.array_formulais deprecated in favor of keywordref:; will be removed in version 0.2.0. -
Top-level aliases
Xlsxrb.stream,Xlsxrb.sheet_name,Xlsxrb.color_to_hex,Xlsxrb.serial_to_datetime, andXlsxrb::Utils.serial_to_datetimeare deprecated in favor ofXlsxrb.read,Xlsxrb.sanitize_sheet_name,Xlsxrb.to_hex_color, andXlsxrb.serial_to_time; will be removed in version 0.2.0. -
Xlsxrb.formatis deprecated in favor ofXlsxrb.format_value; will be removed in version 0.2.0. -
Xlsxrb.datetime_to_serialandXlsxrb::Utils.datetime_to_serialare deprecated in favor ofXlsxrb.time_to_serial; will be removed in version 0.2.0. -
Xlsxrb::MAX_COLis deprecated in favor ofXlsxrb::MAX_COLUMN; will be removed in version 0.2.0. -
Xlsxrb::Utilscoordinate and date conversion methods (col_name_to_index,col_index_to_name,ref_to_row_col,row_col_to_ref,parse_range,range_to_ref,date_to_serial,serial_to_date,serial_to_time,time_to_serial) andElements::Cell.column_index,column_letter,parse_refare deprecated in favor of top-levelXlsxrb.*helpers; will be removed in version 0.2.0. -
Keyword
:col_deltainXlsxrb::Utils.expand_formulais deprecated in favor of:column_delta; will be removed in version 0.2.0. -
Keyword
:siinXlsxrb.shared_formulais deprecated in favor of:shared_index; will be removed in version 0.2.0. -
Xlsxrb::Error::DIV0..VALUEcell error constants on the exception class are deprecated in favor ofElements::CellError::DIV0..VALUE; will be removed in version 0.2.0. -
Redundant method and setter aliases across builders and element readers (
add_row,skip_row,group_column,group_cols,group_col,group_row,outline_pr,add_threaded_comment,background_picture,picture,background_picture=,picture=,add_protected_range,add_cell_watch,phonetic_pr,phonetic_pr=,set_default_font,add_column,first_col,last_col,range,range=,col,col=,row,row=,sz,sz=,error,error=,prompt,prompt=) are deprecated and will be removed in version 0.2.0. -
Singular
column:androw:keywords indefined_nameare deprecated in favor of pluralcolumns:androws:; will be removed in version 0.2.0. -
show_symbols:keyword inoutline_propertiesis deprecated in favor ofshow_outline_symbols:; will be removed in version 0.2.0. -
fit_to_page?on builders is deprecated in favor offit_to_page; will be removed in version 0.2.0. -
Keywords
styles:andstyle:onWorksheetBuilder#row,StreamWriter#row, andWorksheetProxy#roware deprecated in favor ofcell_styles:androw_style:; will be removed in version 0.2.0. -
Passing non-Integer style names or Hash definitions to
style_index:onElements::Cell.newandElements::Worksheet#update_cellis deprecated in favor ofstyle:; will be removed in version 0.2.0. -
Elements::Worksheet#cellis deprecated in favor of bracket access (sheet["A1"]orsheet[row, col]) and will be removed in version 0.2.0. -
StreamSheet#cellis deprecated in favor of materializing anElements::Worksheetviasheet.loadand using coordinate bracket access; will be removed in version 0.2.0. -
StreamSheet#first_rowandStreamSheet#last_rowreturning integer row numbers are deprecated in favor ofrow_rangeordimension_bounds; will be removed in version 0.2.0. -
Passing coordinate keyword arguments (
row:,col_start:,col_end:,row_start:,row_end:) tomergeonWorksheetBuilder,StreamWriter, andWorksheetProxyis deprecated in favor of coordinate range strings (e.g."A1:C1"); coordinate kwargs will be removed in version 0.2.0. -
Elements::FilterColumn#col_idis deprecated in favor of#column_id; will be removed in version 0.2.0. -
Elements::WorkbookProperties#active_tabis deprecated in favor of#active_sheet, andElements::Workbook#active_tabis deprecated in favor of#active_sheet_index; will be removed in version 0.2.0. -
Elements::Chart#cat_axis_titleand#val_axis_titleare deprecated in favor ofcategory_axis[:title]andvalue_axis[:title]; will be removed in version 0.2.0. -
Elements::Worksheetconstructor keywordssheet_calc_pr:,calc_pr:,phonetic_pr:,background_picture:,picture:are deprecated in favor of canonical keyword arguments; will be removed in version 0.2.0. -
Calling builder getter methods with arguments to set values or mutate state (
active_sheet,first_sheet,show_sheet_tabs,tab_ratio,code_name,tab_color,sheet_calc_properties,phonetic_properties,background_image,state, and subbuildersTableBuilder,DataValidationBuilder,ConditionalFormatBuilder) is deprecated and will become 0-argument getters in version 0.2.0; use dedicated setters (xxx=) instead. -
Calling
fit_to_pagewith arguments is deprecated and will become a 0-argument boolean getter in version 0.2.0; usefit_to_page = true/falseorpage_setup(fit_to_width: ..., fit_to_height: ...)instead. -
Calling
StyleBuilderboolean mutator methods (bold,italic,underline,strike,superscript,subscript,wrap_text,shrink_to_fit,locked,hidden) with zero arguments to mutate state is deprecated; passtrueexplicitly (e.g.bold(true)). -
TableBuilder#[]and#[]=are deprecated in favor of#column(name)and#add_column; will be removed in version 0.2.0. -
TableBuilder#total_row,#total_row=,#total_row_count, and#total_row_count=are deprecated in favor oftotals_row,totals_row=,totals_row_count, andtotals_row_count=; will be removed in version 0.2.0. -
Elements::Styles#num_fmtis deprecated in favor ofStyles#number_format_code; will be removed in version 0.2.0. -
Elements::Dxf#num_fmtis deprecated in favor ofDxf#number_format; will be removed in version 0.2.0. -
Elements::SheetProperties#page_setup_pris deprecated in favor ofSheetProperties#page_setup_properties; will be removed in version 0.2.0. -
StreamSheet#first_columnandStreamSheet#last_columnare deprecated in favor ofcolumn_range; will be removed in version 0.2.0. -
StreamSheet#sheet_views,#first_column_index,#last_column_index,#legacy_drawing, and#ext_lstare deprecated in favor of#sheet_viewand#column_range; will be removed in version 0.2.0. -
Elements::Worksheet#conditional_formattingandStreamSheet#conditional_formattingare deprecated in favor ofconditional_formats; will be removed in version 0.2.0. -
Elements::Row#to_aandStreamRow#to_areturning cell values are deprecated in favor ofrow.values; in version 0.2.0,to_awill returnArray[Elements::Cell]to conform toEnumerable#to_a. -
Non-predicate boolean queries on element readers (
trim_empty_rows,pad_empty_rows,pad_empty_cells,fit_to_page,show_sheet_tabs,full_calc_on_load) are deprecated in favor of?-suffixed methods (trim_empty_rows?,pad_empty_rows?,pad_empty_cells?,fit_to_page?,show_sheet_tabs?,full_calc_on_load?); will be removed in version 0.2.0. -
Transitional aliases
to_workbookonWorkbook,to_worksheetonWorksheetandStreamSheet, andeach_sheetonWorkbookare deprecated in favor ofloadandeach; will be removed in version 0.2.0. -
Style aliases
Styles#xf,Styles#format_code_for,Styles#classification_for, andStyleBuilder#num_fmtare deprecated in favor ofcell_xf,number_format, andformat_type; will be removed in version 0.2.0. -
Xlsxrb.modifyis deprecated in favor of explicitXlsxrb.load-> mutate ->Xlsxrb.writepipeline; will be removed in version 0.2.0. -
Xlsxrb.write_workbookandXlsxrb.workbook_to_dataare deprecated in favor ofXlsxrb.write; will be removed in version 0.2.0. -
In-memory
Elements::Workbook#close,Elements::Worksheet#close, andElements::Worksheet#loadare deprecated; will be removed in version 0.2.0 (StreamSheet#closeandStreamSheet#loadremain supported). -
Returning non-
Elements::Workbookvalues fromXlsxrb.modifyblocks is deprecated and will raiseTypeErrorin version 0.2.0.
Fixed
-
Prevent attribute loss in
Elements::PivotTable,Elements::TableColumn,Elements::ThreadedComment,Elements::Comment, andElements::FilterColumnby retaining full schema attributes and capturing unmapped keyword options intooptions:. -
Eliminate internal calls to deprecated
MetadataRecord#[],#merge, andcols:acrossWorksheetBuilder,WorkbookBuilder,StreamSheet,Elements::Worksheet, andElements::Styles.
[0.1.17] - 2026-11-01
Added
-
Support threaded comments (
<ThreadedComments>) and workbook person lists (<personList>) acrossWorksheetBuilder,StreamWriter,WorksheetProxy,Ooxml::Writer,WorkbookWriter,DrawingXml,Elements::Worksheet,Elements::Cell,StreamSheet, andOoxml::Reader, serializexl/threadedComments/threadedComment{N}.xmlandxl/persons/person.xmlconforming to the OpenXML threaded comments specification, support root comments and replies withparent_id, timestamps, and resolution states (done), register relationship types and content types, and provide query accessors across worksheets and cells. -
Support combo charts and secondary value axes across
ChartBuilder,DrawingXml,Ooxml::Writer, andDrawingListeners, allow mixed chart types (e.g. bar and line) inside a single plot area with primary and secondary value axes (secondary_value_axis:,secondary_axis:), support per-series axis binding viaSeriesBuilder#secondary_axisandSeriesBuilder#axis, serialize distinct<c:valAx>elements with independent scaling, orientation, units, and gridlines conforming to ECMA-376 Part 4 §21.2 schema sequence, and expose secondary value axis configurations inOoxml::Reader. -
Support shared formula (
<f t="shared">) serialization and reader expansion acrossXlsxrb.shared_formula,Xlsxrb.formula(..., shared_index:, si:),WorksheetWriter,FeaturesXml,WorksheetParser, andWorksheetListener, serialize master (ref,si) and follower (si) elements conforming to ECMA-376 Part 4 §18.3.1.40, and addXlsxrb::Utils.expand_formulato expand relative cell references across shared formula ranges during SAX and streaming parsing. -
Support table calculated columns (
calculatedColumnFormula) and custom totals row formulas (totalsRowFormula) acrossTableBuilder,DslHelpers.normalize_table_options,WorkbookWriter,Writer, andFeatureListeners, addTableBuilder#calculated_columnhelper, supportformula:,data_formula:,totals_row_formula:,total_row_formula:, andtotal_formula:aliases, automatically infertotalsRowFunction="custom"when a totals formula is provided without an explicit function, and exposecalculated_column_formulaanddata_formulain reader output. -
Support font text decoration attributes, including underline styles (
:single,:double,:single_accounting,:double_accounting,:none) and vertical alignment (:superscript,:subscript,:baseline), with dedicated builder helpers (superscript,subscript,vert_align,underline) and option mappings acrossStyleBuilder,WorkbookWriter,StylesXml,FeaturesXml,WorksheetWriter, andOoxml::Reader. -
Support row and column grouping DSL (
group_rows,group_columns,group_row,group_column,group_cols,group_col) and outline view properties (outline_properties,outline_pr) acrossWorksheetBuilder,StreamWriter,WorksheetProxy,Elements::Worksheet,StreamSheet, andOoxml::Reader, emit schema-compliant<outlinePr applyStyles="..." summaryBelow="..." summaryRight="..." showOutlineSymbols="..."/>inWorksheetWriter, and emitcollapsed="1"on<col>elements. -
Enhance conditional formatting with statistical and relative rules (
above_average,top10,duplicate_values,unique_values,contains_blanks,not_contains_blanks,contains_errors,not_contains_errors,time_period), add builder accessors (above_average,equal_average,std_dev,rank,percent,bottom,text,time_period) toConditionalFormatBuilder, map symbol time periods (:today,:last_7_days,:this_month, etc.) to ECMA-376ST_TimePeriodvalues, and automatically infer rule type from options. -
Add
ConditionalFormatBuildersupporting block configuration for conditional formatting acrossWorksheetBuilder,StreamWriter,WorksheetProxy, andOoxml::Writer. -
Add coordinate targeting (
columns:,rows:,col:,row:,except_rows:) toconditional_formatandConditionalFormatBuilder, symmetrically resolving tosqref. -
Enhance
color_scaleconditional formatting with automatic cfvo generation for 2-color (min/max) and 3-color (min/50%/max) scales, and auto-normalize 6-digit RGB hex colors to 8-digit ARGB. -
Enhance
icon_setconditional formatting with automatic cfvo percent distribution for 3, 4, and 5 icon sets, and support symbol icon set styles (:three_arrows,:four_rating,:five_quarters, etc.). -
Enhance
tableandTableBuilderwithauto_filter:option, booleantotal_row/totals_rowhelpers, symbol column names, and symboltotals_row_functionmappings (:sum,:average,:count,:min,:max,:count_nums,:std_dev,:var,:custom). -
Add worksheet name sanitization utility via
Xlsxrb.sanitize_sheet_name(aliased asXlsxrb.sheet_nameandDslHelpers.sanitize_sheet_name), sanitizing forbidden characters (\,/,?,*,[,],:, control characters), replacing leading/trailing apostrophes, appendingreplace_charto the reservedHistorysheet name, and truncating names to 31 characters. -
Add
sheet_namestoStreamWriter,WorksheetProxy, andWorkbookBuilderreturning an array of worksheet names currently registered in the workbook. -
Support
sheet.defined_namesymmetrically acrossWorksheetBuilder,StreamWriter, andWorksheetProxy, automatically quoting sheet names with single quote escaping and generating absolute$coordinate references. -
Support
fill: { color: ... }andfill_color:in conditional formatting rules andextract_dxf_from_rule!. -
Support
size:alongsidesz:in conditional formatting differential formatting (dxf) fonts. -
Support
base_font:inXlsxrb.rich_text(*runs, base_font: ...)to merge base font attributes across text runs. -
Support
size:alongsidesz:inRichTextRun, inline rich text, and shared strings XML fonts. -
Add coordinate-based targeting (
columns:,rows:,except_rows:,col:,row:) tovalidate_dataandDataValidationBuilderwith interval run compression (compress_runs), complement calculation (complement_runs), and automatic chunking into multiple<dataValidation>entries when reference counts exceed 32,767 (Xlsxrb::MAX_REFS_PER_VALIDATION). -
Expose spreadsheet dimension limits
Xlsxrb::MAX_ROW = 1_048_576,Xlsxrb::MAX_COL = 16_384, andXlsxrb::MAX_REFS_PER_VALIDATION = 32_767. -
Support direct array in
validate_data(..., in: [...])converting totype: "list"with quoted CSVformula1. -
Automatically infer
show_input_message: truewhenprompt:orprompt_title:is provided, infershow_error_message: truewhenerror:orerror_title:is provided, and convert multiline prompts and errors (\r\n,\n) to OOXMLST_Xstringformat (_x000a_). -
Support explicit
:default/:nonecell style identifier to emits="0"and prevent unintended column style inheritance. -
Merge duplicate
sheet.columndefinitions on the same column index and sort by column index in in-memory and streaming modes. -
Inherit
sheet_format[:default_col_width]when a column definesstyle:without explicitwidth:. -
Support sheet visibility states (
state::visible,:hidden,:very_hidden, andhidden: true) acrossStreamWriter#sheet,WorksheetProxy, andWorkbookBuilder#sheet, propagate state into streaming workbook XML, reject invalid state values withArgumentError, and enforce that at least one visible worksheet exists instrict_excel_mode. -
Add active sheet and workbook view configuration (
active_sheet,first_sheet,show_sheet_tabs,tab_ratio, andsheet(..., active: true)) acrossWorkbookBuilder,StreamWriter, andWorksheetProxy, resolve active tab indices safely to avoid hidden sheet selection, emitactiveTab,firstSheet,showSheetTabs, andtabRatioon<workbookView>, guarantee singletabSelected="1"emission on the active sheet, and exposeactive_tab,active_sheet,first_sheet,show_sheet_tabs?, andtab_ratioonElements::Workbook. -
Enhance worksheet tab color configuration (
tab_color) acrossWorksheetBuilder,StreamWriter, andWorksheetProxywith support for RGB hex strings, theme colors, tint, indexed colors, and auto color, emit full<tabColor>attributes inWorksheetWriterandOoxml::Writer, and exposetab_colorreaders onElements::WorksheetandStreamSheet. -
Support worksheet error check warning suppression rules (
<ignoredErrors>) viaignore_errorandadd_ignored_erroracrossWorksheetBuilder,StreamWriter, andWorksheetProxy, emit schema-compliant<ignoredErrors>elements inWorksheetWriter, and exposeignored_errorsreaders onElements::WorksheetandStreamSheetwith full round-trip preservation. -
Support worksheet phonetic (furigana) guide properties (
<phoneticPr>) viaphonetic_properties(and aliasphonetic_pr) acrossWorksheetBuilder,StreamWriter, andWorksheetProxy, emit schema-compliant<phoneticPr>elements inWorksheetWriterandWorkbookWriterin Part 4 schema sequence position, and exposephonetic_propertiesquery readers onElements::WorksheetandStreamSheetwith full round-trip preservation. -
Support workbook and worksheet code names (
code_name), page setup fit-to-page linkage (fit_to_page,fit_to_page?), and worksheet calculation properties (sheet_calc_pr,full_calc_on_load?) acrossWorkbookBuilder,WorksheetBuilder,StreamWriter, andWorksheetProxy, emit schema-compliantcodeNameon<workbookPr>and<sheetPr>, emit<pageSetUpPr fitToPage="1"/>and<sheetCalcPr fullCalcOnLoad="1"/>inWorksheetWriterconforming to ECMA-376 Part 4 schema sequence, and expose query methods and properties onElements::Workbook,Elements::Worksheet, andStreamSheetwith full round-trip fidelity. -
Support worksheet background image (
<picture r:id="..."/>) viabackground_image(with aliasesbackground_picture,picture,background_image=,background_picture=,picture=) acrossWorksheetBuilder,StreamWriter, andWorksheetProxy, serialize relationship inxl/worksheets/_rels/sheet{N}.xml.relsand binary media inxl/media/sheet{N}_bg.{ext}, register image extension in[Content_Types].xml, emit schema-compliant<picture>element inWorksheetWriterconforming to ECMA-376 Part 4 schema sequence, and exposebackground_imagequery readers onElements::WorksheetandStreamSheetwith full round-trip fidelity. -
Add visual regression test example, Visual Gallery section, and WebAssembly Live Playground preset for worksheet views and advanced properties (
sheet_properties). -
Support hierarchical differential format Hash (
dxf: { font: ..., fill: ... }) inconditional_formatandadd_conditional_formatacrossStreamWriter,WorksheetProxy,WorksheetBuilder, andOoxml::Writerwith automatic deduplication, emit<b val="0"/>,<i val="0"/>,<strike val="0"/>on booleanfalsefont properties, and support automatic/theme/tint font and background colors andpattern: "none"pattern fills. -
Add
skip_rows(and aliasskip_row) toStreamWriter,WorksheetProxy, andWorksheetBuilderto advance the row cursor without writing empty<row>XML elements. -
Support configurable workbook-wide default font (
default_font: { name:, size: },default_font(name, size, **opts),set_default_font) acrossStreamWriter,WorksheetProxy,WorkbookBuilder,Xlsxrb.write, andXlsxrb.build, serializing name, size, family, charset, and scheme onto the base font (font 0). -
Support inline strings option (
shared_strings: false) acrossStreamWriterandXlsxrb.write, writing cells directly as<c t="inlineStr"><is><t>...</t></is></c>and omittingxl/sharedStrings.xmland package relationships to maintain flat $O(1)$ constant memory during streaming write. -
Support configurable ZIP deflate compression level (
compression_level: 0..9) acrossStreamWriter,Ooxml::ZipWriter,Ooxml::WorkbookWriter, andXlsxrb.write, allowing performance tuning between compression speed (e.g. level 4 for 20-40% faster writes) and archive size.
Changed
-
Unify differential format extraction across
WorkbookWriterandStreamWriterinto centralizedDslHelpers.extract_dxf_from_rule!. -
Synchronize mutation testing metrics in
README.md,docs/MUTATION_TESTING.md, anddocs/QUALITY_ASSURANCE.mdto reflect 51 pure functional subjects and 2,549 mutations at 100.00% kill rate. -
Optimize
bin/pre-pushand test suite execution time: -
Scope mutation testing (
rake mutant:pure) to subjects and test files matching changed files viaMUTANT_FILES(running only affected pure logic subjects in ~2-20s rather than all 51 subjects), falling back to full coverage whenRakefileor.mutant.ymlchanges or when--forceis passed, and suppressing parser future-frozen string warnings during mutation runs. -
Eliminate duplicate
rake siginvocation inbin/pre-push(already invoked as a prerequisite ofrake typecheck) and run unit and contract tests in a singlerake testprocess rather than two separate test processes. -
Decouple serial RBS runtime type validation (
test:rbs) from default localbin/pre-push --all(saving ~160s locally where static Steep type checking already ensures zero errors), while preserving automated runtime type validation on CI and allowing manual execution withbin/pre-push --all --rbsorRUN_RBS=1. -
Condition SimpleCov coverage profiling on
ENV["COVERAGE"] == "1"orENV["CI"] == "true", eliminating 5-10s of instrumentation overhead during local test runs. -
Replace anonymous keyword argument forwarding (
**) inStreamWriterandWorksheetBuilderwith explicit**optsto prevent Steep 2.1.0 internalRuntimeErrorcrashes during type synthesis. -
Update
bin/setupto install.git/hooks/pre-pushas a wrapper forwarding directly tobin/pre-push --all, ensuringgit pushruns extended diff-scoped mutation verification while staying synchronized withbin/pre-push.
Fixed
-
Guard
Ooxml::Writer#generate_table_xmlagainstTypeErrorwhentbl[:style]is provided as a string, and resolve table style attributes (show_first_column,show_last_column,show_row_stripes,show_column_stripes) directly from table definition root. -
Omit
<autoFilter>tag from table XML whenauto_filter: falseis explicitly specified acrossOoxml::WriterandWorkbookWriter. -
Enforce strict Excel worksheet name rules in
StreamWriter#sheet,WorkbookBuilder#sheet, andElements::Worksheet.valid_name?/validate, rejecting colons (:), leading/trailing apostrophes ('), and the case-insensitive reserved nameHistory, updating validation error messages to reference Excel constraints. -
Guard against non-finite Float values (
Float::INFINITY,Float::NAN, and non-finite cached formula values) inStreamWriter#rowandWorksheetWriter#write_row_values, raisingArgumentErrorto prevent corrupt XML output. -
Support
xsd:booleanrepresentations ("true","false","1","0") acrossStylesParser,StylesListener, and column definitions inWorksheetParser. -
Safely handle
nilshared strings table index (sst_index: nil) across unstyled fast path and general cell paths inWorksheetWriter#write_row_values, writing string values as inline strings (t="inlineStr") without error. -
Include
test/ooxml/**/*_test.rbin Rake test tasks and update custom number format assertions to useElements::Styles#num_fmt. -
Preserve formatted text runs (
<r><rPr>...</rPr><t>...</t></r>) in inline strings (<c t="inlineStr">) forElements::RichTextcells across unstyled fast path and general row paths inWorksheetWriter#write_row_valueswhenshared_strings: falseis used.
[0.1.16] - 2026-10-24
Changed
-
Encapsulate
Elements::Styleswith dedicated collection readers (fonts,fills,borders,cell_xfs,num_fmts,dxfs,cell_style_xfs,cell_styles,table_styles,indexed_colors,mru_colors,colors) and item lookups (font,fill,border,cell_xf/xf,num_fmt,dxf,cell_style_xf,cell_style), removing public Hash delegation ([],[]=,fetch,dig,keys,values,each,merge!), and provide builder helpers (add_font,add_fill,add_border,add_num_fmt,add_xf,add_dxf,add_cell_style_xf,add_cell_style,add_style) that append entries, invalidate memoized caches, and return allocated IDs. -
Enforce binary encoding (
ASCII-8BIT) on raw XML buffers inStreamRowand document byte vs character indexing consistency policy inAGENTS.mdto prevent terminal row truncation or byte-offset drift when scanning documents with multibyte UTF-8 characters. -
Clarify streaming write memory profile and date/time timezone semantics in README and YARD documentation.
-
Reading a file that is not a ZIP archive (including an empty file) raises
Xlsxrb::ZipErrorinstead ofArgumentError. -
Strict numeric cell values: an explicit numeric cell (
t="n") with an invalid number raisesXlsxrb::ParseError, while an empty<v>reads asnilinstead of0, exponent notation such as1E-3reads as a Float, and non-numeric values in cells withouttfall back to their string payload. Inline string and formula string cells without text read asnil, andt="d"cells read as their ISO 8601 text.
Fixed
-
Compound File Binary (CFB) header validation: Validate major version (3 or 4) and sector shifts in
Ooxml::Cfb::Reader#parse_headerand bounds-check sector reading against file size inread_sector, preventingRangeErrorinteger overflows on corrupted or tampered inputs and raisingXlsxrb::Errorgracefully. -
Unstyled empty cells and column ranges: Suppress style attribute (
s="...") emission on unstyled empty cells inWorksheetWriter#write_row,write_cell, andwrite_row_valuesto prevent unintended style inheritance explosion when rows or columns have styles, and preserve columnmin..maxranges on round-trip acrossbuild_worksheet,Elements::Column, andWorksheetWriter#write_columns. -
Data validation
showDropDownandimeModeattributes: SerializeshowDropDown="1"andimeModeon<dataValidation>elements inWorksheetWriter#write_data_validations, matchingOoxml::WriterandDataValidationsListener. -
Sheet views and selection serialization: Omit hardcoded
tabSelected="1"inWorksheetWriter#write_sheet_viewsunlesstab_selectedis true, preventing multiple sheets from opening simultaneously selected in Excel, serialize full sheet view properties (top_left_cell,zoom_scale_normal,view, etc.), and preserve active cell selection acrossWorksheetWriter,Elements::Worksheet,StreamSheet, andXlsxrb.write. -
Differential format (
<dxfs>) parsing and boolean font properties: Parse differential formats (<dxf>) inOoxml::StylesParserand serialize font,numFmt, fill, alignment, border, and protection inWorkbookWriter, parse and serialize ECMA-376CT_BooleanPropertyattributes (<b val="0"/>,<i val="0"/>) for font properties, and preserve<color auto="1"/>inStylesParser. -
Column and row style inheritance and serialization: Resolve named and inline column and row styles to integer style indices and propagate style inheritance to unstyled cells in
WorkbookBuilder#process_styles, serialize row style attributeson streaming<row>elements inWorksheetWriter#write_row_values, and guard<col style>emission against non-integer identifiers. -
Resolve boolean (
t="b") formulacached_valuepayloads ("1","0","true","false") totrueandfalseinOoxml::Reader::WorksheetListener#store_cell_value, matching streaming and DOM cell parsers. -
Forward
:type,:ref, and:shared_index(:si) formula attributes when building cells from a formula Hash ({ formula: ..., type: :array, ref: ... }) inWorksheetBuilder#row,Xlsxrb.build_raw_cell, andXlsxrb.build_raw_cell_from_value. -
Unify
Ooxml::Reader#extract_zip_entryandOoxml::Reader#entry_nameswithOoxml::ZipReaderto support case-insensitive OPC part name resolution (per ECMA-376 Part 2 §9.1.1.2), ZIP64 archives, and data-descriptor streams uniformly across all reader APIs. -
Exclude non-worksheet relationship parts (
chartsheet,dialogsheet,macrosheet,xlMacrosheet,xlIntlMacrosheet) andxl/chartsheets/,xl/dialogsheets/,xl/macrosheets/targets from standard worksheet enumeration inXlsxrb.read,Xlsxrb.modify, andOoxml::Reader#discover_sheets. -
Excel date boundary guards: Raise
ArgumentErrorwhen writing dates before the date system epoch (1899-12-31/1900-01-01in 1900 date system or1904-01-01in 1904 date system) or after9999-12-31indate_to_serial, and raiseArgumentErrorwhen reading negative serials or serials exceeding9999-12-31(serial >= 2_958_466in 1900 system orserial >= 2_957_004in 1904 system) inserial_to_date, adhering to ECMA-376 date constraints and preventing corrupted Julian day calculations or negative date representation errors. -
Formula cached value falsy resolution and boolean typing: Fix falsy checks on formula
cached_valueacrossXlsxrb,build_raw_cell_from_value, andWorksheetWriterso that booleanfalseand numeric0are not skipped or converted tonil, and serialize boolean cached values with cell typet="b"and<v>1</v>/<v>0</v>per ECMA-376 Part 4 §18.3.1.4. -
Boolean cell parsing tolerance: Support text payloads
"true"and"false"(case-insensitive) in addition to numeric"1"and"0"for cells with boolean type attributet="b", conforming to ECMA-376xs:booleanspecification and preventing booleantruecells from evaluating tofalse. -
Template modification in
Xlsxrb.modify: Support case-insensitive and slash-normalized archive entry replacement per ECMA-376 Part 2 §7.3, preventing shadowed or duplicate entries when archives use mixed casing (such asxl/SharedStrings.xml) or Windows backslashes (such asxl\worksheets\sheet1.xml). Preserve XML namespace prefixes (such as<x:worksheet>,<x:sst>,<x:si>) during sheetData replacement and shared strings appending, prevent duplicatexmlns:rattribute definitions in namespaced and ISO/IEC 29500 Strict documents, and correctly anchor<hyperlinks>and<legacyDrawing>after preceding root container elements to avoid illegal nesting inside<customSheetViews>or extension blocks. -
Resolve Open Packaging Conventions (OPC) workbook part path dynamically via root relationships (
_rels/.rels), enabling reading and modifying workbooks with non-standard part names or root locations (such asxl/workbook2.xmlorworkbook.xml), and fall back to standard sheet and part locations when workbook relationships are missing or corrupted. -
Handle multibyte UTF-8 characters encoded as ASCII-8BIT (binary) strings during XML escaping and buffer concatenation in worksheet writer, workbook writer, and streaming sheet, preventing
Encoding::CompatibilityErrorwhen cell values or formulas contain multibyte text. -
ECMA-376 schema conformance during workbook serialization: Format hash-based colors (
{ theme: ... },{ indexed: ... },{ auto: ... }) into schema-compliant<color>elements in stylesheets and workbooks instead of emitting unparseable Hash string representations (rgb="{...}"), strictly validate 6/8-character hex colors againstST_UnsignedIntHex, reorder DrawingML line and character properties (a:ln,a:rPr) to satisfy ECMA-376xs:sequencechild constraints, preserve leading and trailing whitespace usingxml:space="preserve"on<si><t>elements insharedStrings.xml, drop data validations missing requiredsqrefreferences, and omit negativefirstPageNumbervalues in worksheetpage_setup. -
String fallback when cell type attribute
tis omitted: Parse numeric strings (integers, floats, exponents) when cell type attribute is omitted, while treating non-numeric text payloads in<v>as raw strings rather than raisingXlsxrb::ParseError, allowing parsing of cells generated by Open XML SDK and other spreadsheet producers without crashing. -
XML namespace prefix tolerance in shared strings parser (
Ooxml::SharedStringsParser): Locate<sst>,<si>,<t>, and<rPh>tags dynamically regardless of XML namespace prefixes (such as<x:sst>,<x:si>,<x:t>), preventing dropped shared strings in spreadsheets produced by Microsoft Open XML SDK, ClosedXML, and other XML-prefixed generators. -
Consolidate cell value interpretation across streaming fast-scan direct, row values, events, and SAX listener parsers into a centralized
Ooxml::WorksheetParser.resolve_cell_valuehelper, eliminating redundant logic and preventing parser divergence. -
Preserve worksheet and workbook attributes during in-memory writes (
Xlsxrb.write(workbook)): accurately map and serializefreeze_pane,split_pane,sheet_view,page_setup,page_margins,header_footer,print_options,sheet_protection,tables,merged_cells,auto_filter,row_breaks,col_breaks, and embedded images fromElements::Worksheet, and propagate workbook properties (core_properties,app_properties,custom_properties,workbook_protection). -
Support arbitrary XML attribute ordering on cells (such as
tbeforesorrafters) in streaming fast-scan parsers, ensuring cell types and styles are never dropped regardless of producer attribute sequence. -
Empty self-closing string cells without
<v>in fast scan parsers evaluate tonilinstead of empty string"". -
In-memory SAX listeners (
WorksheetListenerandSharedStringsListener) skip phonetic readings (<rPh>) and treat empty self-closing string cells (<c ... t="s"/>) as nil, matching streaming reader behavior. -
Rich text parsing in shared strings parser (
Ooxml::SharedStringsParser): Handle self-closing<t/>tags when the first run is empty without dropping subsequent runs, while bounding phonetic tag scans to maintain linear throughput. -
extract_inline_textandextract_multi_tstrictly distinguish<t>elements from other XML tags containing ‘t’ (such as<rPr>,<vertAlign>, or<table>), preventing corrupted inline string parsing in rich text runs. -
Formulas are serialized strictly when explicitly defined via
Xlsxrb.formula(...)or{ formula: ... }. Plain string cells starting with=are always serialized as text cells, preventing formula injection vulnerabilities and unintended 0-value coercions on reload. -
Streaming reads no longer drop the cell that follows a self-closing empty cell (
<c r="A1" s="1"/>) inStreamRow#valuesandStreamRow#cells. -
Streaming reads place a row-leading cell with a multi-letter column reference (
AB1) in its own column instead of column A. -
Phonetic readings (
<rPh>) are excluded from shared strings and inline strings, so cells with furigana no longer concatenate phonetic readings to display text.
Added
-
Extract and preserve
activeTab(<workbookView>) andfullCalcOnLoad(<calcPr>) inOoxml::WorkbookParser,Xlsxrb.read, andXlsxrb.modify, and exposeworkbook_properties,active_tab, andfull_calc_on_load?(full_calc_on_load) readers onElements::Workbook. -
Support self-closing row tags (
<row r="N" .../>): Extract row indices and custom row attributes (ht,hidden,customHeight,outlineLevel,collapsed,s) and emit:row_start/:row_endevents and emptyStreamRowinstances across direct and streaming worksheet parsers. -
ISO/IEC 29500-1 ST_Xstring control character decoding: Support decoding
_xHHHH_hexadecimal escape sequences (such as_x000D_carriage returns and_x005F_literal underscores) inXmlBuilder.unescape,SharedStringsParser, andSharedStringsListener, correctly normalizing newlines and preserving control character fidelity in cell strings. -
Record Architecture Decision Record ADR 0001: Excel Date System Boundary Handling documenting date conversion semantics, ecosystem survey, and design rationale across 1900 and 1904 date systems.
-
Date validation and boundary checks: Add
Xlsxrb::Ooxml::Utils.valid_excel_date?(and delegates onXlsxrb::UtilsandXlsxrb) to check if a numeric serial value falls within the supported Excel date boundaries [0, 2,958,465] (1900 system) or [0, 2,957,003] (1904 system). -
ZipReader#open_entry_ioandZipReader#each_entry_chunksupport anencoding:parameter and automatically resolve.xmland.relsentries to UTF-8 encoding, preventingEncoding::CompatibilityErrorin downstream text and regular expression operations. -
Xlsxrb::Ooxml::Utils.booleanizeandXlsxrb::Ooxml::Utils.camelizehelper methods for OOXML attribute serialization and name casing conversion. -
Round-trip contract tests in
test/contract/round_trip_fidelity_test.rbverifying thatread -> write -> readpreserves worksheet and workbook attributes across streaming and loaded in-memory representations. -
Alias
conditional_formattingtoconditional_formatsonStreamSheetfor complete API symmetry withElements::Worksheet. -
Property-based tests for cell XML parsing in
test/pbt/cell_xml_parser_pbt_test.rb, validating 100% equivalence between streaming fast-scan and SAX listener parsers across random attribute permutations, namespaces, rich text, and phonetic elements. -
Dedicated exception
Xlsxrb::ZipBombError < Xlsxrb::ZipErrorfor archive expansion limit violations. -
Workbook view and calculation properties in in-memory writes:
Xlsxrb.write(workbook)emits<bookViews><workbookView activeTab="n"/></bookViews>and<calcPr fullCalcOnLoad="1"/>when the workbook properties carryactive_tab:andfull_calc_on_load: true. -
Autonomous QA agent squad skill definitions and documentation: Added skill playbooks in
.agents/skills/(throughput-performance,security-resilience,api-contract,concurrency-safety,visual-fidelity), and updateddocs/QA_AGENTS.md,docs/QUALITY_ASSURANCE.md,.agents/rules/qa_agents.md, andAGENTS.md. -
Visual fidelity and Wasm compatibility verification agent (
visual-fidelity): Formulated autonomous skill playbook covering headless LibreOffice Calc visual regression testing (rake test:visual) and WebAssembly playground asset verification (rake doc:check). -
API symmetry and contract verification agent (
api-contract): Added reflective method signature and parameter arity parity tests betweenWorksheetBuilder,StreamWriter, andWorksheetProxyintest/contract/api_symmetry_test.rb, addedvery_hidden?predicate on bothElements::WorksheetandStreamSheet, and enforced lossless round-trip serialization contracts between streaming and in-memory workflows. -
Security and resilience verification agent (
security-resilience): Added regular expression ReDoS audit tests intest/security_resilience_test.rbverifying linear processing under 10k+ character adversarial inputs, supportedmax_uncompressed_sizeoption onXlsxrb.readblock form to protect streaming decompression from ZIP bombs, and addedescape_formulas: trueoption onXlsxrb.write,StreamWriter, andWorksheetWriterto prevent formula and CSV injection vulnerabilities. -
Throughput and complexity verification agent (
throughput-performance): Added deterministic allocation bounds testing (< 25 objects/row write, < 15 objects/row read for 10k rows) and scaling ratio tests intest/performance/throughput_test.rb, hot-path microbenchmarks withbenchmark-ips(benchmark/micro_ips.rb), and correspondingbenchmark:ipsrake task. -
Concurrency and Ractor safety verification agent (
concurrency-safety): Added automated reflection scan testing that 100% of constants in theXlsxrbnamespace areRactor.shareable?, deeply frozeEPOCH_1900,EPOCH_1904,INTEGER_STRINGS, andLOCAL_HEADER_SIG, added Ractor-safe accessors for REXML security settings inXmlParser, and added full parallel write/read/modify pipeline verification across concurrent Ractors intest/concurrent_test.rb.
[0.1.15] - 2026-10-17
Added
-
Block form for table and data validation configuration: Support optional configuration block in
tableandvalidate_datamethods onWorksheetBuilder,StreamWriter, andWorksheetProxyusingTableBuilderandDataValidationBuildercontexts. -
Protected range and cell watch configuration DSL and properties (
protected_rangeandcell_watch): Addprotected_range(and aliasadd_protected_range) andcell_watch(and aliasadd_cell_watch) methods toWorksheetBuilder,StreamWriter, andWorksheetProxy, normalize passwords into ECMA-376 compliant hashes or modern SHA-512 protection attributes, serialize<protectedRanges>and<cellWatches>according to OOXML schema sequence rules inWorksheetWriter, and exposeprotected_rangesandcell_watchesreaders onElements::WorksheetandStreamSheet. -
Range coordinate conversion utilities (
Xlsxrb::Utils.parse_rangeandrange_to_ref): Parse cell range references ("A1:C10","A1") to 0-based[[top_row, left_col], [bottom_row, right_col]]coordinate pairs, and format bounding coordinate tuples into A1-style range references ("A1:C10") withXlsxrb.parse_rangeandXlsxrb.range_to_reffacade methods. -
Sheet format configuration DSL and properties (
sheet_format): Addsheet_formatmethod toWorksheetBuilder,StreamWriter, andWorksheetProxysupportingdefault_row_height:,default_col_width:, and extended properties (outline_level_row,outline_level_col,zero_height,custom_height,thick_top,thick_bottom), serialize<sheetFormatPr>schema-compliantly inWorksheetWriterandWorkbookWriter, and exposesheet_formatreader onElements::WorksheetandStreamSheet. -
Numeric and hexadecimal XML entity decoding in
XmlBuilder.unescape: Support decoding decimal (&#...;) and hexadecimal (&#x...;) XML numeric character references with UTF-8 encoding andRangeErrorfallback. -
ZIP64 extra field support in
ZipReader: Support reading ZIP64 extra fields (0x0001) in both central directory headers and local file headers for 64-bit uncompressed sizes, compressed sizes, and local header offsets. -
Expose
merged_cellsandauto_filteronElements::Worksheet: Expose parsed sheet merge ranges and auto filter definitions directly on in-memory worksheets when loaded viaXlsxrb.readandStreamSheet#load. -
Expose document properties and protection settings on
Elements::Workbook: Exposecore_properties,app_properties,custom_properties, andworkbook_protectionreaders on in-memory workbooks, populating them duringXlsxrb.readfromdocProps/core.xml,docProps/app.xml,docProps/custom.xml, and<workbookProtection>. -
Support updating cell hyperlinks and comments in
Xlsxrb.modify: Synchronize modified cell hyperlinks and comments during template modification, updating or creating_rels/sheetN.xml.rels,commentsN.xml,vmlDrawingN.vml, and schema-compliant<hyperlinks>and<legacyDrawing>tags in worksheet XML. -
Expose sheet structure, print, and view metadata on
Elements::WorksheetandStreamSheet: Exposetables,shapes,freeze_pane,page_setup,page_margins,header_footer,print_options,sheet_protection,sheet_view,sheet_properties,row_breaks, andcol_breakson both streaming and in-memory worksheets. -
WebAssembly Live Playground Monaco Editor integration: Replaced
<textarea>with Monaco Editor indocs/preview.htmlfeaturingvs-darktheme, Ruby syntax highlighting, 2-space auto-indentation, auto-closing brackets and quotes, minimap, line numbers, and xlsxrb DSL snippet completion candidates (Xlsxrb.write,wb.sheet,wb.style,s.row,s.column,s.chart,s.table,s.merge, etc.). Implemented Blob URL worker initialization for Cross-Origin Isolation (COOP/COEP) compatibility and isolated AMD loader state during UMD binary bootstrap. -
Automated documentation and playground verification (
rake doc:check): Validate generated documentation assets (file existence, minimum sizes, and magic bytes), verify HTTP server responses (status 200/206, MIME types, COOP/COEP headers, and absence of invalid compression headers) via byte-range requests, and automatically parse and execute all Live Playground presets to guarantee error-free generation prior to preview and deployment. -
WebAssembly Live Playground: Revamped
docs/preview.htmlwith currentXlsxrb.writeDSL, added visually striking Executive Dashboard first view featuring an embedded Ruby gem logo image, KPI summary cards, zebra-striped table, currency formats,=SUMformulas, and a clustered bar chart in ~55 lines, added interactive preset selector with 11 spreadsheet scenarios (executive dashboard, sales reports, bar/line/pie charts, tables, borders, number formats, conditional formatting, hyperlinks, and Japanese text), direct URL deeplinking (?example=...), and seamless link integration throughoutVisualGallery.mdandREADME.md. -
New visual examples and VRT baselines for missing formatting and print features:
hyperlinks.rb(external and internal cell hyperlinks),column_styles.rb(column-level default number formats and styling),page_repeat_rows.rb(repeating header rows for print setup), andsheet_protection.rb(password protection with granular permissions).
Changed
-
Standardized top navigation header across all documentation pages and Live Playground: Unified navbar with
Documentation,Visual Gallery,Live Playground, andGitHubnavigation links, active page highlighting, search input, and SVG theme toggle. -
Reorganized documentation sidebar navigation: Promoted
Visual GalleryandLive Playgroundto prominent action items at the top of the sidebar, renamed the collapsibledocsfolder to an openGuidessection, and formatted screaming uppercase filenames into clean Title Case labels (Architecture,Development Guide, etc.) to eliminate visual noise. -
Enhanced search index discoverability: Pre-indexed all documentation guides, pages, and the Live Playground in
search_data.jsso search queries for “Visual Gallery”, “Playground”, and “Architecture” yield instant results. -
Universal rendering without font tofu: Replaced theme toggle emojis with SVG sun and moon icons, and replaced README comparison table emoji checkmarks with accessible text badges (
Yes/-) to eliminate tofu glyphs (□) across Linux and headless environments. -
Visual Gallery layout polish: Constrained gallery overview thumbnails to 160px width with neat borders, styled
Live Playgroundactions as interactive buttons, and constrained full baseline preview images to a maximum height of 480px to avoid unbounded scrolling whitespace. -
Documentation callout banners: Transformed GitHub-style markdown alert blockquotes (
[!TIP],[!NOTE],[!WARNING]) into styled callout banners with SVGs. -
Cleaned up duplicated inline doc tags: Stripped repeated
rbs_inline: enabledand@api publictags from generated module documentation. -
Align WebAssembly Live Playground design with documentation: Unify
docs/preview.htmlvisual styling with the RDoc Aliki documentation design system, adding light and dark theme support with local storage persistence, synchronized Monaco Editor theme switching (vsandvs-dark), top navigation bar matching documentation layout with links to documentation and visual gallery, solid brand coral red Run button matching documentation accent tokens, and dynamic status dot indicator (Initializing...,Ready,Rendering...,Error). -
Cleaned up visual examples and gallery generator: Stripped internal read validation debug dumps across all visual examples to present concise DSL code snippets, refreshed formula and merge syntax to use modern public APIs (
Xlsxrb.formula,A1:C1ranges), and reorganizedVisualGallery.mdinto 9 structured capability categories with dedicated preview tables and live playground links. -
Removed non-visual and redundant visual examples: Removed
invoice_statement.rbandstreaming_append.rband their baseline directories from the visual regression test suite and gallery. -
Use
nilfor unstyled cells inembedded_images.rbexample instead of undefined"left".
Fixed
-
XML namespace prefix tolerance in template modification (
replace_sheet_data): Locate<sheetData>and matching closing tags dynamically regardless of XML namespace prefixes (such as<x:sheetData>or<d:sheetData>) or self-closing syntax duringXlsxrb.modify. -
Resilience against duplicate XML declarations and malformed
.relsfiles inRelationshipsParser: Sanitize duplicate or multiple<?xml ...?>declarations and provide regex fallback scanning if SAX parsing fails on malformed relationship XML. -
Fix false positive date detection for color tags like
[Red]inOoxml::Reader#date_pattern?: Unify custom number format date evaluation withNumberFormatter.date_format?, ignoring bracketed formatting codes (such as[Red]or[Green]) so negative numbers with colored styles are not misidentified as dates. -
Fix layout overlap between Playground Run & Preview button and theme toggle: Override absolute positioning of
.theme-togglefrom RDoc Aliki styles with static inline-flex flow indocs/preview.htmlto eliminate button collision and preserve clean spacing across light and dark modes. -
Prevent WebAssembly out-of-memory error during ZetaOffice instantiation on Firefox: Provide custom
Module.instantiateWasmhandler indocs/preview.htmlwith streaming-first compilation (WebAssembly.instantiateStreaming/WebAssembly.compileStreaming) to bypass Emscripten’s defaultinstantiateArrayBufferfallback that allocates an extra 160MB ArrayBuffer on memory pressure, and sequence Ruby Wasm and LibreOffice Wasm engine initialization to eliminate concurrent memory peaks. -
Resolve WebAssembly Live Playground (
docs/preview.html) console errors and warnings across Chromium and Firefox: -
Compile
ruby.wasmvia streaming (WebAssembly.compileStreaming) with automatic fallback to avoid large intermediate ArrayBuffer heap allocations, eliminatingInternalError: out of memoryon memory-constrained browser environments. -
Bypass service worker registration and reloading in
coi-serviceworker.jswhen native Cross-Origin Isolation headers (COOP/COEP) are already present, preventing in-flight network request abortions (NS_BINDING_ABORTED). -
Filter benign C/C++ Emscripten/Qt runtime stderr diagnostics in
Module.printErrand route diagnostic output toconsole.lograther thanconsole.warn. -
Guard UNO document model close/dispose handling in
office_thread.jsto cleanly close previous models without emittingconsole.warnon preset switching or re-runs. -
Prevent unhandled clipboard permission errors in Live Playground on Firefox: Intercept
navigator.permissions.queryindocs/preview.htmland worker thread bootstrap to resolve dummyPermissionStatusobjects forclipboard-readandclipboard-write, preventing uncaughtTypeErrorexceptions from Embind in browsers that do not support clipboard descriptors inPermissionDescriptor. -
Fix missing closing angle bracket on styled formula cells in
WorksheetWriter: Add missing>before<f>element when emitting styled formula cells inWorksheetWriter#write_row_values, resolving XML syntax errors (<c r="..." s="..."<f>) that caused LibreOffice and spreadsheet engines to reject sheet formatting. -
Prevent serialization of unresolved non-integer style names as
sattribute inWorksheetWriter: Guard style resolution inWorksheetWriterto only emit valid integer style indices, ignoring unresolved strings or symbols to maintain ECMA-376 XML Schema conformance (xs:unsignedInt). -
Prevent invalid
Content-Encoding: brheader in localdoc:previewserver: Remove erroneous Brotli encoding header injected on uncompressed Emscripten.datapackages (such assoffice.data), and supply native Cross-Origin Isolation headers (COOP,COEP,CORP) to resolve browser decompression failures (NS_ERROR_INVALID_CONTENT_ENCODING).
[0.1.14] - 2026-10-10
Added
-
Non-self-closing
<sheet>and<xf>tag compatibility: Verify and support spreadsheet XML where<sheet>...</sheet>inworkbook.xmlor<xf>...</xf>instyles.xmlare serialized with explicit closing tags rather than self-closing syntax. -
Namespace prefix resilience for relationship and embed attributes: Match relationship and embed attributes by local name or any namespace prefix (
r:id,d3p1:id,rel:id,id,r:embed,embed) acrossWorkbookListener,HyperlinksListener,DrawingListener, andWorksheetParser, ensuring reliable sheet, hyperlink, and media resolution for non-standard XML generators. -
UTF-16LE, UTF-16BE, and UTF-8 BOM encoding normalization in
ZipReader: Automatically detect and transcode Byte Order Mark (BOM) encoded XML streams (\xFF\xFE,\xFE\xFF, and\xEF\xBB\xBF) to UTF-8 inZipReader#read_entryandEntryStreamIO, enabling seamless parsing of workbooks generated on Windows Phone and legacy platforms. -
XML 1.0 line ending normalization (
\r\nand\rto\n): Normalize line breaks in shared strings, inline strings, and cell text values per W3C XML 1.0 §2.11 acrossSharedStringsParserandWorksheetParser. -
Whitespace and newline tolerance in cell regex scanning: Allow whitespace and newline sequences between
<c>child tags (<f>,<v>,<is>) and strip whitespace on extracted values inWorksheetParser, ensuring reliable parsing of pretty-printed or formatted worksheet XML. -
Sequential row index fallback for omitted
rattributes: Track previous row index and fall back to sequential 1-based indexing when<row>elements omit therattribute per ECMA-376 Part 1 §18.3.1.73 across direct string scanning, chunked stream scanning, and event scanning inWorksheetParser. -
Case-insensitive part name lookup in
ZipReader: Fall back to case-insensitive lookup for package part entries per ECMA-376 Part 2 §8.1.1, allowing workbooks with case-varying part names (such as lower-casexl/sharedstrings.xmlorxl/styles.xml) to resolve transparently. -
Windows backslash path separator normalization in
ZipReader: Normalize Windows backslash separators (\) in ZIP central directory and local headers to standard forward slashes (/), enabling transparent extraction and catalog lookup for XLSX archives generated on Windows. -
First-class sparkline groups on worksheet and
add_sparklinehelper: Exposesparkline_groupsreader and keyword argument onElements::Worksheet, propagatews.sparkline_groupsduringXlsxrb.writeDOM serialization, and addadd_sparkline(location:, range:, type:, **opts)helper toWorksheetBuilder,StreamWriter, andStreamWriter::SheetContextsupporting:win_lossmapping to"stacked". -
High-level print area and print titles DSL: Add
print_area,print_titles,repeat_rows, andrepeat_columnstoWorksheetBuilder,StreamWriter::SheetContext, andStreamWriter, exposeprint_areaandprint_titlesonElements::Worksheet, and auto-generate_xlnm.Print_Areaand_xlnm.Print_Titlesdefined names inWorkbookBuilder#buildandXlsxrb.writeDOM export. -
ECMA-376 indexed color palette and
Xlsxrb::Colors: AddXlsxrb::ColorsprovidingINDEXED_COLORS(indices 0..63 per ECMA-376 Part 4 §18.8.27),palette_color, andto_hexutilities, exposeXlsxrb.palette_colorandXlsxrb.to_hex_colorfacade methods, and resolve integer palette indices 0..63 automatically inStyleBuilder.resolve_color. -
Flexible rich text run input in
Xlsxrb.rich_text: Support[text, font_hash]pair arrays, alternating varargs of plain strings and format hashes or objects responding toto_font_hash, and mixedElements::RichTextRuninstances. -
First-class
Elements::Hyperlink,Xlsxrb.hyperlink, andCell#tooltip: AddElements::Hyperlinkdata class andXlsxrb.hyperlinkfactory helper withtooltip:support, exposeCell#tooltipand:tooltip,:urlsymbol key access onElements::Cell, and supportElements::Hyperlinkinstances inWorksheetBuilder#hyperlink,StreamWriter#hyperlink, andOoxml::Writer#hyperlink. -
Array and dynamic array formula serialization and
Xlsxrb.array_formula: AddXlsxrb.array_formula(expression, ref, cached_value:)factory method, extendXlsxrb.formulawith optionaltype:andref:keywords, and serialize<f t="array" ref="...">and shared formula attributes across allWorksheetWriterserialization paths. -
First-class
style_index:keyword onElements::Column: Addstyle_index:keyword argument directly toElements::Column.new, storing it inData.defineattributes and populating it fromrc[:style_index]during worksheet parsing and DSL column definitions. -
In-memory streaming write and row append chaining: Support
Xlsxrb.writewith omitted target in block mode to return an in-memory binary String, support self-returning<<row appending for chaining acrossStreamWriter,SheetContext, andWorksheetBuilder, and addadd_rowaliases. -
Unified color and border style normalizers in
StyleBuilder: AddStyleBuilder.normalize_color(supporting 140+ CSS named colors,#RGB,#RRGGBB,#AARRGGBBhex strings, numeric RGB integers, and optional alpha channel) andStyleBuilder.normalize_border_style(supporting border style symbols, aliases, strings, and 0..13 numeric border indices). -
Public date and time serial conversion utilities: Expose
date_to_serial,serial_to_date,datetime_to_serial, andserial_to_time(aliasedserial_to_datetime) onXlsxrbandXlsxrb::Utilsfor converting RubyDateandTimeinstances to and from Excel 1900 and 1904 serial numbers. -
Cascade style inheritance and column styles: Support cascade style inheritance (Cell Style > Row Style > Column Style) in
WorksheetWriter, and addstyle:parameter toStreamWriter#columnandWorksheetBuilder#column. -
Embedded drawing and image extraction: Add
Elements::Imagerepresenting anchored embedded images, exposeimages,images_at, andwith_imagesacrossStreamSheetandElements::Worksheet, and exposeimagesandimages_atacrossElements::Workbook. -
Configurable sparse vs padded row and cell iteration: Add
pad_empty_rowsandpad_empty_cellsoptions toXlsxrb.read,Xlsxrb.build_worksheet,StreamSheet,WorksheetParser.each_row, andElements::Worksheetto pad skipped rows or missing cells up to the maximum column, and addStreamRow#to_handElements::Row#cells_hashfor coordinate-keyed row maps. -
Row XML metadata accessors and serialization: Expose row XML metadata (
collapsed,collapsed?,hidden?,custom_height?,attributes) onStreamRowandElements::Row, supportcollapsed:inStreamWriter#rowandWorksheetBuilder#row, and serializecollapsed="1"inWorksheetWriter. -
Format classification helpers: Add
Elements::Styles#format_code_forand#classification_foraliases, allowNumberFormatterformat predicates (date_format?,time_format?, etc.) to resolve built-in formats bynum_fmt_id, and exposeformat_type,date_format?, andtime_format?onElements::Cell. -
Date1904 accessor: Expose
Ooxml::Reader#date1904?and adddate1904:keyword argument toElements::Workbook#initialize. -
Coordinate utilities module: Add
Xlsxrb::Utilsexposing public coordinate helpers (ref_to_row_col,row_col_to_ref,col_name_to_index,col_index_to_name,split_coordinate). -
Configurable trailing empty row trimming: Add
trim_empty_rowsoption acrossXlsxrb.read,Xlsxrb.build_worksheet,WorksheetParser.each_row,StreamSheet#initialize,StreamSheet#each_row,StreamSheet#each_row_values,StreamSheet#each,Elements::Worksheet#initialize,Elements::Worksheet#each_row, andElements::Worksheet#each_row_valuesto omit trailing empty rows, and addempty?predicate toStreamRowandElements::Row. -
Direct typed values streaming iterator: Add
StreamSheet#each_row_valuesandElements::Worksheet#each_row_valuesto stream row values directly as Arrays without allocatingElements::Cellobjects, and addtype_cast: truesupport acrossStreamSheet#each_row_values,Elements::Worksheet#each_row_values,StreamRow#values, andElements::Row#valuesto coerce date/time serial numbers intoDateandTimeinstances. -
Precomputed number format classifications in Styles: Add
Xlsxrb::Elements::Styles(subclass ofHash) with precomputed $O(1)$ format classification lookups (number_format,format_type,date_format?,datetime_format?,time_format?,date_only_format?), updateStylesParser.parseto returnElements::Styles, and add classification helper methods toXlsxrb::NumberFormatter. -
Worksheet dimension and coordinate bounds: Expose
dimension,first_row,first_column(aliasedfirst_col),last_row, andlast_column(aliasedlast_col) onStreamSheetandElements::Worksheet(andElements::CoordinateAccess), lazily extracting<dimension ref="..."/>in $O(1)$ memory without scanning the full sheet. -
Date1904 propagation to streaming sheets and rows: Propagate the workbook’s 1904 date system flag to
StreamSheetandStreamRow, exposedate1904?onStreamSheet,StreamRow,Elements::Worksheet, andElements::Cell, and defaultCell#to_dateandCell#to_timeto the cell’sdate1904setting. -
Elements::RichTextRun: AddRichTextRundata class representing formatted text runs withinRichText, supporting hash-like bracket access and seamless integration withXlsxrb.rich_text. -
First-class conditional formatting and data validation on
Elements::Worksheet: Exposeconditional_formatting(and aliasconditional_formats) anddata_validationsas first-class fields onElements::Worksheet, populate them during round-trip parsing inXlsxrb.build_worksheet, and serialize them in in-memory workbook serialization. -
Date1904 calendar system arithmetic: Support the 1904 date system (1904-01-01 base epoch) across serial date conversions,
Cell#to_date,Cell#to_time,Elements::Workbook#date1904?,Ooxml::Reader,Ooxml::WorksheetWriter,Ooxml::WorkbookWriter, andStreamWriter. -
Row and column styles persistence: Expose
style_indexonRow,Column, andStreamRow, and persist row and column styles (<row s="..." customFormat="1">and<col style="..."/>) during serialization and round-trip parsing. -
Styles metadata persistence: Support border colors, cell alignment, and protection attributes in stylesheet generation and round-trip parsing.
-
Dual format support for
num_fmts: Support bothHash({ 164 => "format" }) andArray([{ num_fmt_id: 164, format_code: "format" }]) structures for custom number formats inWorkbookWriter. -
Initial shared strings table seeding: Support pre-seeding
sstinXlsxrb.writewhenworkbook.shared_stringsis provided. -
Sheet visibility state: Support worksheet visibility state (
state,hidden?,visible?) acrossStreamSheet,Elements::Worksheet,WorkbookParser,WorkbookBuilder, andWorkbookWriter, preserving:visible,:hidden, and:very_hiddenvisibility in streaming read, in-memory representations, and XML serialization. -
Workbook defined names: Parse
<definedNames>inWorkbookParserand exposedefined_namesarray anddefined_name(name, sheet: nil)lookup onElements::Workbook, supporting global and sheet-scoped named ranges and formula constants. -
Cell formula query and expression methods: Expose
formula?predicate andformula_expressionstring accessor onElements::Cell, and normalize empty formula expressions tonilin streaming and DOM cell parsing. -
Worksheet and cell hyperlinks: Parse and expose hyperlink metadata across
StreamSheet#hyperlinks,Elements::Worksheet#hyperlinks, andElements::Cell#hyperlink,#link?, and#url, supporting external targets and internal sheet references in streaming read, DOM models, and builders. -
Worksheet and cell comments: Parse and expose comment and note metadata across
StreamSheet#comments,StreamSheet#comment,Elements::Worksheet#comments, andElements::Cell#comment,#comment?, and#comment_text, supporting comment annotations and coordinate lookups in streaming read, DOM models, and builders. -
Number formatting engine and extended cell metadata: Add
Xlsxrb::NumberFormattersupporting standard and custom OpenXML format codes (currencies, percentages, date/time, fixed-point padding, accounting patterns, scientific notation, and text), exposeformatted_value,raw_value, andformat_codeonElements::Cell, addformatted_valuecoordinate lookups onElements::Worksheet,StreamSheet, andElements::Workbook, and exposeraw_values,formatted_values, andformulasmetadata onElements::RowandStreamRow. -
Fallback serialization for DOM model attributes: Support serializing first-class
ws.state,ws.comments,ws.hyperlinks, andworkbook.defined_namesinXlsxrb.write(workbook)when not explicitly packaged insideunmapped_data[:facade]metadata.
Changed
-
Optimize chunked streaming read performance: Hoist
</sheetData>tag lookup outside row iteration, eliminate byte delimiter array allocations, and terminate entry inflation early once worksheet rows are fully parsed, restoring streaming read throughput faster than in-memory read while preserving $O(1)$ memory consumption.
Fixed
-
Fallback cached value for formula cells: Emit
<v>0</v>instead of omitting<v>when a formula cell does not specify a cached value, ensuring compatibility with OpenXML parsers (such as Roo and LibreOffice) that discard formula cells lacking<v>elements. -
Shared formula cell parsing: Support self-closing formula tags (e.g.
<f t="shared" si="0"/>) inWorksheetParserregex scanners, preventing cells containing shared formulas from being silently omitted. -
Fixed missing
dcterms:createdanddcterms:modifiedserialization inWorkbookWritercore properties (docProps/core.xml). -
Prevent
Encoding::CompatibilityErrorinXlsxrb.readandCfb::Reader.cfb?when inspecting raw string buffers in UTF-8 encoding.
[0.1.13] - 2026-09-25
Added
-
Non-destructive template modification: Support modifying existing XLSX templates while preserving unmapped parts, media, charts, drawings, and VBA macros via
Xlsxrb.modify. -
StreamSheet structural metadata accessors: Expose
merged_cells,auto_filter,data_validations, andconditional_formatsonStreamSheet. -
Pre-Push Smart Change Detection: Optimized
bin/pre-push --allto automatically skip runtime RBS validation and pure logic mutation testing when unrelated files are modified, adding--lastand--forcecontrols.
Changed
-
True O(1) memory streaming read via chunked entry inflation in
ZipReaderandWorksheetParser, preventing unbounded memory retention on large worksheets. -
Extracted pure DSL normalizers (
Xlsxrb::DslHelpers) and fast XML unescape utilities (Ooxml::XmlBuilder.unescape). -
Constrained
rexmlruntime dependency to~> 3.0and excluded documentation, build assets, and developer configurations from the gem package.
Removed
-
OpenTelemetry runtime dependency and tracer spans.
[0.1.12] - 2026-09-20
Added
-
Mutation Testing Framework (
mutant): -
Full-scale integration of mutant test suite targeting the Functional Core (10 classes and modules, 38 subjects).
-
Achieved 100.00% Kill Rate (1,091 / 1,091 mutations killed, 0 alive) without exclusions.
-
Added dedicated root configuration
.mutant.ymlfor streamlined CLI execution (bundle exec mutant run -- '...'). -
Integrated
bundle exec rake mutant:pureinto GitHub Actions CI pipeline (main.yml), guaranteeing mutation-tested quality on every push and pull request. -
Added architecture and testing guide in
docs/MUTATION_TESTING.md. -
Pre-Push Quality Verification Script (
bin/pre-push): Added automated pre-push verification script running RuboCop, Steep type checking, RBS sync validation, Unit & Contract tests, RBS runtime type validation, and pure logic mutation testing, with automatic hook installation inbin/setup.
Changed
-
Functional Core & Imperative Shell Architecture:
-
Purified core business logic and domain entities into deterministic, side-effect-free class methods and predicates:
-
Extracted coordinate and validation predicates:
Elements::Cell.valid_value?,Cell.valid_coordinates?,Cell.calculate_column_letter,Cell.calculate_column_index. -
Extracted domain validation predicates:
Elements::Row.valid_index?,Elements::Column.valid_index?,Elements::Worksheet.valid_name?. -
Replaced date/time serial calculations in
Ooxml::Utilswith pure mathematical conversions (Julian Day math fordate_to_serial,divmodarithmetic forserial_to_datetime, and 1900 leap year bug handling). -
Extracted binary packing utilities in
Ooxml::ZipGenerator(le16,le32, and bitfield arithmetic fordos_datetime). -
Extracted pure XML character escaping logic in
Ooxml::XmlBuilder.escape.
-
-
Modularized
Ooxml::Writerinto domain-specific mixin modules (DrawingXml,FeaturesXml,StylesXml). -
Extracted shared DSL parameter normalization and range expansion into
Xlsxrb::DslHelpers. -
Modularized reader SAX listeners into domain-specific parser components.
Fixed
-
Boundary Validation & Error Reporting:
-
Strictly validate row number digits in
Elements::Cell.parse_refto reject malformed cell coordinate strings (e.g.A0,A01). -
Harmonized supported value type checks and nil/empty handling across
Elements::Cell.validate. -
Corrected maximum row index boundary error messages in
Elements::Row.validate. -
Hardened cryptographic stream boundary checks and corrupted header handling in Standard and Agile encryption modes.
-
RBS Runtime Type Validation:
-
Expanded
Elements::Workbook#initialize,#sheet, and[]type annotations to acceptStreamSheetinstances used by streaming readers. -
Made update block parameter optional in
Elements::Workbook#update_sheetto allow testing missing block validation. -
Supported
Numerictypes (Float and Integer) inChartBuilderandSeriesBuilderkwargs (width, etc.). -
Handled
RBS::Test::Tester::TypeErrorin unit tests verifying block return type validation.
[0.1.11] - 2026-08-19
Performance
-
Sub-Second Streaming Write (< 1.0s / 1,000,000 cells):
-
Achieved sub-second streaming write performance (0.97 s median for 1M cells) while maintaining 100% full SST (Shared String Table) XML deduplication and ISO/IEC 29500 compatibility.
-
Implemented 1-Pass Direct ZIP streaming pipeline, eliminating all intermediate tempfiles, disk seek-backs, and extra deflate flush cycles.
-
Added dedicated unstyled fast-path in
WorksheetWriter#write_row_valueswith precomputed coordinate and integer lookup tables. -
Pre-registered default date/time formatting styles, completely eliminating redundant per-row scan loops.
-
Streamlined
ZipWriterinstance variable lookups to eliminate per-chunk hash overhead. -
Added
alias << rowtoWorksheetProxyandStreamWriterfor idiomatic Ruby streaming. -
High-Speed Streaming Read (1.61s / 1,000,000 cells):
-
Reduced streaming read execution time from 3.40 s down to 1.61 s (over 2x speedup).
-
Refactored
Elements::Cellinto an optimized lightweight class withCell.fast_create, reducing 1M cell instantiation overhead by 5.2x (0.92s → 0.17s) while maintaining full pattern matching (deconstruct,deconstruct_keys) and immutability. -
Replaced per-byte Ruby scanning in
WorksheetParser.fast_scan_cells_directwith an Onigmo C-level regular expression scanner (CELL_FAST_RE), eliminating 100,000 intermediate XML substring allocations and nested byte loops. -
Optimized
StreamRow#cellsto populate cell arrays via direct block traversal, eliminating Enumerator object allocations.
Documentation
-
Updated benchmark results, performance comparisons, and linear-scale SVG charts across
README.mdanddocs/PEER_LIBRARIES.md.
[0.1.10] - 2026-08-19
Added
-
Peer Libraries Ecosystem Guide (docs/PEER_LIBRARIES.md): Introduced a respectful overview of the Ruby XLSX ecosystem featuring official self-descriptions, architectural tradeoffs (SST vs. Inline Strings, Streaming vs. In-Memory), and reproducible benchmarks across 9 popular Ruby XLSX gems.
-
Visual Assets & Screen Previews:
-
Embedded interactive WebAssembly Playground live demo preview in
README.md. -
Added real-world Ruby LSP autocompletion and RBS type hint preview in
README.md. -
Created accurate, neutral linear-scale SVG benchmark performance chart.
-
Multi-Layered Test Suite Expansion:
-
ECMA-376 XSD Schema Validation: XML schema validation suite ensuring strict element ordering and ISO/IEC 29500 compliance.
-
Contract Testing Suite: Parity verification between Streaming (
Xlsxrb.write) and In-Memory (Xlsxrb.build) APIs. -
Property-Based Testing (PBT): Expanded automated random generation tests for Row/Column invariants, styles, and edge cases.
-
Visual Regression Testing (VRT): Added new visual baselines for table styles, drawing shapes, and pivot tables.
-
E2E Interoperability Suite: Added tests for namespace-prefixed XML streaming, conditional formatting, and table structures.
Fixed
-
WebAssembly (ruby.wasm) Compatibility: Bundled
ppandprettyprintstandard libraries inruby.wasmpackage to resolve REXML LoadError during browser-based evaluation.
Changed
-
Streamlined README: Refactored README from 363 to 175 lines, focusing on core motivation, clean 4-column feature matrix, concise usage examples, and direct links to specialized documentation.
[0.1.9] - 2026-08-18
Added
-
Password Protection & Document Encryption ([MS-OFFCRYPTO] / [MS-CFB]): Full native Pure-Ruby support for reading, writing, and modifying password-protected Excel spreadsheets without any external C-extension dependencies.
-
Standard Encryption: AES-128-ECB and SHA-1 Key Derivation with CryptoAPI 50,000-spin hashing, fully interoperable across Microsoft Excel, LibreOffice, and Google Sheets.
-
Agile Encryption: Modern AES-256-CBC, PBKDF2/SHA-512, and HMAC-SHA512 data integrity verification.
-
Compound File Binary (CFB) Engine: Pure-Ruby reader and writer for OLE structured storage containers with Mini Stream, FAT/MiniFAT sectors, and Red-Black tree directory management.
-
Transparent Public API Integration: Added
password:andencryption_mode:arguments toXlsxrb.read,Xlsxrb.write, andXlsxrb.modify. -
Security & Threat Model Hardening:
-
Constant-time hash verification via
OpenSSL.secure_compareto prevent timing attacks (CWE-208). -
CSPRNG-backed salt, IV, and session key generation via
SecureRandom(CWE-330). -
DoS defense: spinCount limit ($\le 10\text{M}$), CFB circular sector chain loop detection in directory/FAT parsing, and
total_sizebounds validation (CWE-400, CWE-835). -
Strict exception hierarchy (
EncryptedFileError,InvalidPasswordError,DecryptionError).
-
-
Cross-Platform & Interoperability Validation: Bidirectional validation with Microsoft .NET OpenXML SDK and LibreOffice Calc.
-
WebAssembly (ruby.wasm) Support: Pre-packaged
docs/wasm/ruby.wasmupdated with document encryption support for browser playground.
[0.1.8] - 2026-08-18
Changed
-
Unified Symmetric Entrypoints: Consolidated reading into
Xlsxrb.read(supporting file path, IO, and raw binary string) and writing intoXlsxrb.write(supporting streaming blocks or in-memory Workbooks). Removed legacyopen,foreach, andgeneratemethods. -
Streaming-First Defaults:
Xlsxrb.readyields and returns lightweightStreamSheetinstances with $O(1)$ constant-memory consumption by default. -
Explicit In-Memory Materialization (
#load): Stripped accidental random-access memory traps fromStreamSheet; introduced explicitStreamSheet#load/Workbook#load(inspired by ActiveRecord Relations) to transition from lazy streaming to in-memoryElements::Worksheet/Elements::Workbook. -
CoordinateAccessModule: Extracted coordinate lookup methods ([],cell_value,row_at,first_row,last_row,cells,cells_hash) into a dedicatedXlsxrb::Elements::CoordinateAccessmixin module included inElements::Worksheet.
Added
-
Default Cell Streaming (
Xlsxrb::StreamRow): Enabled streaming along both row and cell dimensions viarow.each_cellandsheet.each_cell, parsing cells on-demand to handle sheets with thousands of columns in $O(1)$ constant memory.
[0.1.7] - 2026-08-16
Added
-
Bundled native Ruby LSP Add-on (
RubyLsp::Xlsxrb::Addon) for zero-configuration, context-aware method autocompletion and rich markdown documentation in VS Code and LSP-enabled editors for block arguments (wb.,s.,sheet.,stream_writer.,stream_sheet.). -
YARD documentation (
@param,@return,@example) across all public APIs, builders, proxies, and elements.
Developer Experience
-
Enhanced
rbs-inlinetype signatures across all facade methods and builder objects with automated RBS generation. -
Added VS Code Steep extension configuration for Dev Containers.
[0.1.6] - 2026-08-15
Added
-
Support for unseekable IO streams (pipes,
ActionDispatch::Response::Buffer, socket streams) across streaming reader and writer. -
Complete
rbs-inlinetype annotations across all library source files and automatedsig/generated/synchronization in CI. -
Automated Steep static type-checking workflow in GitHub Actions.
-
Hash-compatible symbol indexing in
Elements::Row#[](:cells,:index,:height,:attrs) andElements::Cell#[](:value,:ref,:style_index).
Performance
-
Streaming Write: Replaced per-cell micro IO calls with row-level string buffering and fast-path serialization for unstyled cells (1,000,000 cells in 1.62s with standard SST).
-
In-Memory Write: Optimized DOM serialization (
WorksheetWriter#write_row) with row-level buffer aggregation, boosting 1,000,000 cells write from 22.33s to 4.06s (5.5x faster) and reducing GC count by 83%. -
Streaming Read: Implemented zero-allocation byte scanning for cell attributes (
r="...",t="...",s="...") and direct integer conversion for SST indexes, cutting GC count by ~70% (129 -> 40) and boosting 1,000,000 cells read to 3.38s. -
In-Memory Read: Reduced peak memory footprint by 57% (582 MB -> 250 MB).
Documentation
-
Overhauled
benchmark.rbwithbundler/inlinefor deterministic, zero-setup benchmark reproduction pinning peer gem versions. -
Updated README.md Motivation and Benchmark tables with verified default vs optional string storage architecture (SST vs Inline) and latest 1,000,000 cells measurements.
[0.1.5] - 2026-08-11
Added
-
Functional API for updating existing files (
Xlsxrb.modify). -
New
Workbook#update_sheetandWorksheet#update_cellhelpers for immutable data structures. -
Syntactic sugar for
styles:insheet.rowusingHashandRangekeys (e.g.styles: { 0..4 => "header" }). -
Support for inline anonymous styles as Hash objects (e.g.
styles: { 0 => { font: { bold: true } } }). -
Support for
RangeandArrayarguments insheet.columnto modify multiple columns at once. -
WorkbookBuilder#[]andStreamWriter#[]aliased to#sheetfor elegant context switching. -
Block-based configuration for
fontandborderproperties insideStyleBuilder. -
Extensive inline RBS typing with strict generic types (eliminated
untypedfrom the public API). -
Full
RBS::Testruntime type validation enabled for the entire test suite. -
Extensive Excel limit warnings documented via YARD tags.
-
Formal SemVer API contract with
@api publictags for user-facing methods. -
Mutation testing (Mutant) and test coverage (SimpleCov) integrations.
Changed
-
Replaced
method_missingwith statically defined, fully typed methods inWorksheetProxy,ChartBuilder, andSeriesBuilder. -
Removed deprecated
instance_evalblock context for builders; explicit block arguments are now required. -
Hardened security and bounds checking across the DSL for
strict_excel_mode. -
Fixed numerous Rubocop linting violations and standardized style rules.
-
Add specification reference policy and implemented specification mapping (
docs/SPEC_SOURCES.md). -
Introduce unified event-based streaming and parsing architecture (
Ooxml::Eventand event streams for WorksheetParser/SharedStringsParser). -
Restructure test suite into four distinct tiers (Unit, Contract, E2E, Visual) and renamed
facade_test.rbtopublic_api_test.rb. -
Add visual examples gallery (
examples/visual/anddocs/visual/README.md) and promoted it via animated GIF in the main README. -
Implement visual regression testing (VRT) pipeline comparing generated sheets against reference baselines.
[0.1.0] - 2026-03-25
-
Initial release