From 8a0351fde3c771d1eed4d466ae9034bef67635a0 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 12 Feb 2016 14:04:35 +0000 Subject: [PATCH] fpspreadsheet: Fix incorrect writing order of merged cells and hyperlinks in xlsx files causing an Excel read error (issue #0029640) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4495 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/xlsxooxml.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fpspreadsheet/xlsxooxml.pas b/components/fpspreadsheet/xlsxooxml.pas index fb6483e12..eaa297230 100755 --- a/components/fpspreadsheet/xlsxooxml.pas +++ b/components/fpspreadsheet/xlsxooxml.pas @@ -3450,8 +3450,8 @@ begin WriteSheetViews(FSSheets[FCurSheetNum], AWorksheet); WriteCols(FSSheets[FCurSheetNum], AWorksheet); WriteSheetData(FSSheets[FCurSheetNum], AWorksheet); - WriteHyperlinks(FSSheets[FCurSheetNum], AWorksheet); WriteMergedCells(FSSheets[FCurSheetNum], AWorksheet); + WriteHyperlinks(FSSheets[FCurSheetNum], AWorksheet); // must be after MergedCells, otherwise Excel2007 cannot read it !!! WritePrintOptions(FSSheets[FCurSheetNum], AWorksheet); WritePageMargins(FSSheets[FCurSheetNum], AWorksheet); WritePageSetup(FSSheets[FCurSheetNum], AWorksheet);