Skip to content

xlsx-kit@0.6.0

Choose a tag to compare

@github-actions github-actions released this 11 May 13:21
Immutable release. Only release title and notes can be modified.
280df2a

Minor Changes

  • #71 551901c Thanks @baseballyama! - Re-export DML colour, fill, and text-body primitives from xlsx-kit/drawing. Chart styling reaches <a:srgbClr> / <a:solidFill> / <a:bodyPr>…<a:p>…<a:r> through ShapeProperties.fill, Series.spPr, Axis.txPr, etc., but the building blocks (DmlColor, DmlColorWithMods, Fill, TextBody, TextParagraph, RunProperties, …) and their constructors (makeColor, makeSrgbColor, makeSchemeColor, makeSolidFill, makeTextBody, makeParagraph, makeRun, makeRunProperties, …) previously had no public home. They now ship as part of xlsx-kit/drawing alongside makeShapeProperties. Closes #55, closes #56.

  • #72 80a06bf Thanks @baseballyama! - AxisShared.majorGridlines and AxisShared.minorGridlines now accept boolean | Gridlines instead of just boolean. The Gridlines shape carries a ShapeProperties, so <c:majorGridlines><c:spPr><a:ln>…</a:ln></c:spPr></c:majorGridlines> can be emitted to colour / dash / weight the gridline (e.g. corporate-style light grey D9D9D9). The plain true form keeps emitting <c:majorGridlines/> so all existing call sites stay unchanged. Round-trip through parseChartXml is preserved for both forms. Closes #57.

Patch Changes

  • #69 2317545 Thanks @baseballyama! - Rename the chart-internal NumberFormat interface to ChartNumberFormat and re-export it from xlsx-kit/chart. The interface was already part of the public surface through AxisShared.numFmt and DataLabelList.numFmt, but the type itself was not exported — callers building axis / data-label options had to write the literal inline. The new name also disambiguates from the cell-stylesheet NumberFormat exported from xlsx-kit/styles, which is a different shape ({ numFmtId, formatCode }). Closes #58.

  • #68 060f436 Thanks @baseballyama! - Harden DrawingML Fill serializer against two natural mis-uses. (1) Passing a colour without mods (e.g. { base: { kind: 'srgb', value: 'FF0000' } } instead of { base, mods: [] }) no longer crashes the chart serializer with Cannot read properties of undefined (reading 'map'); the missing modifier list is now treated as empty. (2) Passing a Fill with an unknown kind (e.g. 'solid' instead of 'solidFill') used to silently emit an empty <c:spPr></c:spPr> and lose the caller's styling intent; the serializer now throws OpenXmlSchemaError so the mistake surfaces immediately.

  • #73 f376354 Thanks @baseballyama! - Document the small set of openpyxl → xlsx-kit defaults that differ, in particular that createWorkbook() returns an empty workbook with no sheets (unlike openpyxl.Workbook() which creates a default 'Sheet'). Direct ports of openpyxl code that include a wb.remove(wb.active) call after Workbook() were translating that into a no-op removeSheet(wb, 'Sheet') — the new README "Migrating from openpyxl" subsection calls this out alongside the setCell and makeBorder / makeSide equivalents. Closes #62.