Skip to content

Instantly share code, notes, and snippets.

@aredridel
Created January 1, 2011 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aredridel/762095 to your computer and use it in GitHub Desktop.
Save aredridel/762095 to your computer and use it in GitHub Desktop.
Fix for code page error
Index: Classes/PHPExcel/Shared/CodePage.php
===================================================================
--- Classes/PHPExcel/Shared/CodePage.php (revision 66289)
+++ Classes/PHPExcel/Shared/CodePage.php (working copy)
@@ -45,6 +45,7 @@
*/
public static function NumberToName($codePage = '1252')
{
+ if($codePage == 0) $codePage = 1252;
switch ($codePage) {
case 367: return 'ASCII'; break; // ASCII
case 437: return 'CP437'; break; //OEM US
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment