From a82633f4018da3e88f6c7fc4f860375355d5504e Mon Sep 17 00:00:00 2001 From: Andreas Grabs Date: Wed, 4 Aug 2010 13:53:07 +0000 Subject: [PATCH] Numeric answers was print out as string in the detailed xls-sheet --- mod/feedback/analysis_to_excel.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/feedback/analysis_to_excel.php b/mod/feedback/analysis_to_excel.php index de2923da7ca..35b0f855a62 100644 --- a/mod/feedback/analysis_to_excel.php +++ b/mod/feedback/analysis_to_excel.php @@ -295,12 +295,13 @@ function feedback_excelprint_detailed_items(&$worksheet, $xlsFormats, $completed $itemobj = feedback_get_item_class($item->typ); $printval = $itemobj->get_printval($item, $value); + $printval = trim($printval); // $worksheet->setFormat(''); if(is_numeric($printval)) { - $worksheet->write_number($rowOffset, $colOffset, trim($printval), $xlsFormats->default); + $worksheet->write_number($rowOffset, $colOffset, $printval, $xlsFormats->default); } else { - $worksheet->write_string($rowOffset, $colOffset, trim($printval), $xlsFormats->default); + $worksheet->write_string($rowOffset, $colOffset, $printval, $xlsFormats->default); } $printval = ''; $colOffset++;