diff --git a/main/exercice/exercise_result.class.php b/main/exercice/exercise_result.class.php
index 0b5ec3fd94..dedde3d5c1 100755
--- a/main/exercice/exercise_result.class.php
+++ b/main/exercice/exercise_result.class.php
@@ -343,6 +343,8 @@ class ExerciseResult
} //build the results
require_once(api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php');
$workbook = new Spreadsheet_Excel_Writer();
+ $workbook ->setTempDir(api_get_path(SYS_ARCHIVE_PATH));
+
$workbook->send($filename);
$worksheet =& $workbook->addWorksheet('Report '.date('YmdGis'));
$line = 0;
diff --git a/main/gradebook/gradebook_result.class.php b/main/gradebook/gradebook_result.class.php
index 8fee7ea7de..a8fc79ed60 100755
--- a/main/gradebook/gradebook_result.class.php
+++ b/main/gradebook/gradebook_result.class.php
@@ -255,6 +255,8 @@ class GradeBookResult
//build the results
require_once(api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php');
$workbook = new Spreadsheet_Excel_Writer();
+ $workbook ->setTempDir(api_get_path(SYS_ARCHIVE_PATH));
+
$workbook->send($filename);
$worksheet =& $workbook->addWorksheet('Report '.date('YmdGis'));
$line = 0;
diff --git a/main/inc/lib/debug.lib.inc.php b/main/inc/lib/debug.lib.inc.php
index f04bf7f909..ee00857bfd 100755
--- a/main/inc/lib/debug.lib.inc.php
+++ b/main/inc/lib/debug.lib.inc.php
@@ -66,7 +66,6 @@ function debug_paths()
echo 'SYS_CODE_PATH :'.api_get_path(SYS_CODE_PATH).'
';
echo 'SYS_LANG_PATH :'.api_get_path(SYS_LANG_PATH).'
';
echo 'WEB_IMG_PATH :'.api_get_path(WEB_IMG_PATH).'
';
- echo 'GARBAGE_PATH :'.api_get_path(GARBAGE_PATH).'
';
echo 'PLUGIN_PATH :'.api_get_path(PLUGIN_PATH).'
';
echo 'SYS_ARCHIVE_PATH :'.api_get_path(SYS_ARCHIVE_PATH).'
';
echo 'INCLUDE_PATH :'.api_get_path(INCLUDE_PATH).'
';
diff --git a/main/survey/survey.lib.php b/main/survey/survey.lib.php
index d1db46b367..957f5460a6 100755
--- a/main/survey/survey.lib.php
+++ b/main/survey/survey.lib.php
@@ -3528,6 +3528,7 @@ class SurveyUtil {
require_once(api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php');
$workbook = new Spreadsheet_Excel_Writer();
+ $workbook ->setTempDir(api_get_path(SYS_ARCHIVE_PATH));
$workbook->send($filename);
$worksheet =& $workbook->addWorksheet('Report 1');
$line = 0;