diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php
index de1658b80ea074184fdc40055eae3f06e3ee2ce3..04a3ed62b869df36be65406db6605b667b93ec2d 100644
--- a/htdocs/opensurvey/adminstuds_preview.php
+++ b/htdocs/opensurvey/adminstuds_preview.php
@@ -449,7 +449,7 @@ print '</form>'."\n";
 
 print '<div class="tabsAction">';
 
-print '<a class="butAction" href="public/exportcsv.php?sondage=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>';
+print '<a class="butAction" href="exportcsv.php?id=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>';
 
 print '</div>';
 
diff --git a/htdocs/opensurvey/public/exportcsv.php b/htdocs/opensurvey/exportcsv.php
similarity index 84%
rename from htdocs/opensurvey/public/exportcsv.php
rename to htdocs/opensurvey/exportcsv.php
index 5fded4f5d32f163e95141955ffadcfba1fc4dcb1..49d982f5721e1e766163cd5a5653c378202149f5 100644
--- a/htdocs/opensurvey/public/exportcsv.php
+++ b/htdocs/opensurvey/exportcsv.php
@@ -16,33 +16,23 @@
  */
 
 /**
- *	\file       htdocs/opensurvey/public/exportcsv.php
+ *	\file       htdocs/opensurvey/exportcsv.php
  *	\ingroup    opensurvey
  *	\brief      Page to list surveys
  */
 
 
-define("NOLOGIN",1);		// This means this output page does not require to be logged.
-define("NOCSRFCHECK",1);	// We accept to go on this page from external web site.
-require_once('../../main.inc.php');
+require_once('../main.inc.php');
 require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php");
 
 $action=GETPOST('action');
 $numsondage = $numsondageadmin = '';
-if (GETPOST('sondage'))
+if (GETPOST('id'))
 {
-	if (strlen(GETPOST('sondage')) == 24)	// recuperation du numero de sondage admin (24 car.) dans l'URL
-	{
-		$numsondageadmin=GETPOST("sondage",'alpha');
-		$numsondage=substr($numsondageadmin, 0, 16);
-	}
-	else
-	{
-		$numsondageadmin='';
-		$numsondage=GETPOST("sondage",'alpha');
-	}
+	$numsondageadmin=GETPOST("id",'alpha');
+	$numsondage=substr($numsondageadmin, 0, 16);
 }
 
 $object=new Opensurveysondage($db);