public static function checkString($pValue = null)
    {
        if ($pValue instanceof PHPExcel_RichText) {
            // TODO: Sanitize Rich-Text string (max. character count is 32,767)
            return $pValue;
        }

        // string must never be longer than 32,767 characters, truncate if necessary
        $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 32767);

        // we require that newline is represented as "\n" in core, not as "\r\n" or "\r"
        $pValue = str_replace(array("\r\n", "\r"), "\n", $pValue);

        return $pValue;
    }