From 4deedbb549bd58ac055b2e6e867e544c11ec508e Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 05:40:53 +0000 Subject: [PATCH] warn about dropped XLS rules --- crates/xlsx/src/xls.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/xlsx/src/xls.rs b/crates/xlsx/src/xls.rs index 205e806ff..f5972c0a8 100644 --- a/crates/xlsx/src/xls.rs +++ b/crates/xlsx/src/xls.rs @@ -113,6 +113,16 @@ pub(crate) fn read_xls_budgeted(bytes: &[u8], limits: x::Limits, functions: Func } let mut unparsed = false; for s in &book.sheets { + // craft-xls keeps these rules in its read model, but GridCraft's XLS adapter does not + // import conditional formatting. Its own warnings cover rules it could not decode; this + // reports the additional rules that this adapter drops. + if !s.conditional_formats.is_empty() { + report.warn(warning(&x::Warning::ConditionalFormattingSkipped)); + } + // Data validation is not yet imported by this adapter. + if !s.validations.is_empty() { + report.warn(warning(&x::Warning::DataValidationSkipped)); + } let sheet = sheet_of(s, &styles, &mut unparsed); wb.sheets.push(Arc::new(sheet)); }