hack to get Excel 200X to display additional rows in tables

This commit is contained in:
Ralf Becker 2009-12-27 23:51:25 +00:00
parent 3546f1057d
commit 7e754c28c1

View File

@ -524,6 +524,7 @@ abstract class bo_merge
if (strpos($param[0],'$$LETTERPREFIXCUSTOM') === 0) if (strpos($param[0],'$$LETTERPREFIXCUSTOM') === 0)
{ //sets a Letterprefix { //sets a Letterprefix
$replaceprefix = array(); $replaceprefix = array();
// ToDo Stefan: $contentstart is NOT defined here!!!
$replaceprefix = explode(' ',substr($param[0],21,strlen($contentstart)-2)); $replaceprefix = explode(' ',substr($param[0],21,strlen($contentstart)-2));
foreach ($replaceprefix as $key => $nameprefix) foreach ($replaceprefix as $key => $nameprefix)
{ {
@ -572,9 +573,17 @@ abstract class bo_merge
preg_quote('</w:t></w:r><w:proofErr w:type="spellEnd"/><w:r><w:t>','/').'/i' => '$ $\\1$ $', preg_quote('</w:t></w:r><w:proofErr w:type="spellEnd"/><w:r><w:t>','/').'/i' => '$ $\\1$ $',
); );
break; 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': case 'application/vnd.openxmlformats-officedocument.spreadsheetml.shee':
$mimetype = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; $mimetype = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
case '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'; $archive = tempnam($GLOBALS['egw_info']['server']['temp_dir'], basename($document,'.xlsx').'-').'.xlsx';
copy($content_url,$archive); copy($content_url,$archive);
$content_url = 'zip://'.$archive.'#'.($content_file = 'xl/sharedStrings.xml'); $content_url = 'zip://'.$archive.'#'.($content_file = 'xl/sharedStrings.xml');