You are here

function PHPExcel_Writer_Excel5_Parser::_convertError in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php \PHPExcel_Writer_Excel5_Parser::_convertError()

Convert an error code to a ptgErr

@access private *

Parameters

string $errorCode The error code for conversion to its ptg value:

Return value

string The error code ptgErr

1 call to PHPExcel_Writer_Excel5_Parser::_convertError()
PHPExcel_Writer_Excel5_Parser::_convert in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php
* Convert a token to the proper ptg value. * * @access private *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php, line 782

Class

PHPExcel_Writer_Excel5_Parser
PHPExcel_Writer_Excel5_Parser

Code

function _convertError($errorCode) {
  switch ($errorCode) {
    case '#NULL!':
      return pack("C", 0x0);
    case '#DIV/0!':
      return pack("C", 0x7);
    case '#VALUE!':
      return pack("C", 0xf);
    case '#REF!':
      return pack("C", 0x17);
    case '#NAME?':
      return pack("C", 0x1d);
    case '#NUM!':
      return pack("C", 0x24);
    case '#N/A':
      return pack("C", 0x2a);
  }
  return pack("C", 0xff);
}