xlsx-kit@0.6.0
Minor Changes
-
#71
551901cThanks @baseballyama! - Re-export DML colour, fill, and text-body primitives fromxlsx-kit/drawing. Chart styling reaches<a:srgbClr>/<a:solidFill>/<a:bodyPr>…<a:p>…<a:r>throughShapeProperties.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 ofxlsx-kit/drawingalongsidemakeShapeProperties. Closes #55, closes #56. -
#72
80a06bfThanks @baseballyama! -AxisShared.majorGridlinesandAxisShared.minorGridlinesnow acceptboolean | Gridlinesinstead of justboolean. TheGridlinesshape carries aShapeProperties, 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 greyD9D9D9). The plaintrueform keeps emitting<c:majorGridlines/>so all existing call sites stay unchanged. Round-trip throughparseChartXmlis preserved for both forms. Closes #57.
Patch Changes
-
#69
2317545Thanks @baseballyama! - Rename the chart-internalNumberFormatinterface toChartNumberFormatand re-export it fromxlsx-kit/chart. The interface was already part of the public surface throughAxisShared.numFmtandDataLabelList.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-stylesheetNumberFormatexported fromxlsx-kit/styles, which is a different shape ({ numFmtId, formatCode }). Closes #58. -
#68
060f436Thanks @baseballyama! - Harden DrawingMLFillserializer against two natural mis-uses. (1) Passing a colour withoutmods(e.g.{ base: { kind: 'srgb', value: 'FF0000' } }instead of{ base, mods: [] }) no longer crashes the chart serializer withCannot read properties of undefined (reading 'map'); the missing modifier list is now treated as empty. (2) Passing aFillwith an unknownkind(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 throwsOpenXmlSchemaErrorso the mistake surfaces immediately. -
#73
f376354Thanks @baseballyama! - Document the small set of openpyxl → xlsx-kit defaults that differ, in particular thatcreateWorkbook()returns an empty workbook with no sheets (unlikeopenpyxl.Workbook()which creates a default'Sheet'). Direct ports of openpyxl code that include awb.remove(wb.active)call afterWorkbook()were translating that into a no-opremoveSheet(wb, 'Sheet')— the new README "Migrating from openpyxl" subsection calls this out alongside thesetCellandmakeBorder/makeSideequivalents. Closes #62.