From 46f93428df4ddafb5249812651fa196561c375f2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 27 Dec 2009 23:56:21 +0000 Subject: [PATCH] hack to get Excel 200X to display additional rows in tables --- etemplate/inc/class.bo_merge.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 353e27a40f..56fb9b324c 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -525,6 +525,7 @@ abstract class bo_merge if (strpos($param[0],'$$LETTERPREFIXCUSTOM') === 0) { //sets a Letterprefix $replaceprefix = array(); + // ToDo Stefan: $contentstart is NOT defined here!!! $replaceprefix = explode(' ',substr($param[0],21,strlen($contentstart)-2)); foreach ($replaceprefix as $key => $nameprefix) { @@ -573,9 +574,17 @@ abstract class bo_merge preg_quote('','/').'/i' => '$ $\\1$ $', ); break; + case 'application/xml': + $fix = array( // hack to get Excel 2003 to display additional rows in tables + '/ss:ExpandedRowCount="\d+"/' => 'ss:ExpandedRowCount="9999"', + ); + break; case 'application/vnd.openxmlformats-officedocument.spreadsheetml.shee': $mimetype = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': + $fix = array( // hack to get Excel 2007 to display additional rows in tables + '/ss:ExpandedRowCount="\d+"/' => 'ss:ExpandedRowCount="9999"', + ); $archive = tempnam($GLOBALS['egw_info']['server']['temp_dir'], basename($document,'.xlsx').'-').'.xlsx'; copy($content_url,$archive); $content_url = 'zip://'.$archive.'#'.($content_file = 'xl/sharedStrings.xml');