sorry..
I changed the code as follow
$max_rows=eguide_form_options('excel_max_rows', 40);
it works.

but $max_rows=eguide_form_options('excel_max_rows', $X);
if $X >40 ,then the exported excel can't be open again.