From 2de1abd548e9773a1a6a937ebccf6fb261570685 Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Thu, 12 Aug 2021 10:40:20 +0800 Subject: [PATCH] fix(formatted): do not accumulate merge information across sheets --- src/Codec/Xlsx/Formatted.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Codec/Xlsx/Formatted.hs b/src/Codec/Xlsx/Formatted.hs index 9d39fc36..f2317221 100644 --- a/src/Codec/Xlsx/Formatted.hs +++ b/src/Codec/Xlsx/Formatted.hs @@ -251,6 +251,7 @@ formatWorkbook nfcss initStyle = extract go initSt = stateFromStyleSheet initStyle go = flip runState initSt $ forM nfcss $ \(name, fcs) -> do + modify (\s -> s { _formattingMerges = [] }) -- We do not want merge information to accumulate across sheets. cs' <- forM (M.toList fcs) $ \(rc, fc) -> formatCell rc fc merges <- reverse . _formattingMerges <$> get return ( name