Exemplo n.º 1
0
/**
 * Escapes the specified column value and includes it in a Cell Xml.
 * @param $p_value The value
 * @returns The Cell Xml.
 */
function excel_prepare_string($p_value)
{
    $t_type = is_numeric($p_value) ? 'Number' : 'String';
    $t_value = str_replace(array('&', "\n", '<', '>'), array('&amp;', '&#10;', '&lt;', '&gt;'), $p_value);
    return excel_get_cell($t_value, $t_type);
}
Exemplo n.º 2
0
/**
 * Escapes the specified column value and includes it in a Cell Xml as a number.
 * @param integer $p_value The value.
 * @return string The Cell Xml.
 */
function excel_prepare_number($p_value)
{
    return excel_get_cell($p_value, 'Number');
}