在SSRS SDK PHP的Excel输出格式中渲染大量数据时出现问题

How can i change the SSRS SDK output excel format rendering from, 1997-2003 worksheet format to latest worksheet format (ie from xls to xlsx format). The prior format fails in rendering huge datas with rows more than 65356 rows.

This post is a bit old but the solution may help someone.

To change the excel format used in PHP SSRS SDK from the 1997-2003 to the 2007+ version, change the following line in bin/RenderType/RenderAsEXCEL.php file

public function GetFormat()
{
    return "EXCEL";
}

to

public function GetFormat()
{
    return "EXCELOPENXML";
}

Ideally, you could

  1. Make a copy of the RenderAsEXCEL.php file
  2. Rename to say RenderAsOPENEXCEL.php
  3. Change the GetFormat function as above.
  4. Change the Class name to say RenderAsOPENEXCEL
  5. Add this new file to the SSRSReport.php file after require_once 'RenderType/RenderAsXML.php';

    require_once 'RenderType/RenderAsOPENEXCEL.php';

PS: This only works with Reporting Services 2012 and above.