Hi,
I have a perl script that I downloaded from the web. It allows the user to download data from a mysql file as a .CSV file.
Here's the problem. When I run it using IE on an XP PC, I am prompted to save the file. But when my customer runs it, it never prompts him. Instead it shows all the data in his browser. If he does File/Save as, it put quotes around the data in the text file, so that trying to open it in Excel doesn't parse it.
He is also on an XP PC running IE.
Is this a setting in his browser somewhere? Or is there something I can do differently in my Perl script so that it will definitely prompt him to save the file without showing him the data in his browser?
TIA
Here's the script. The ECSV script simple returns a collection of the data in the file you've passed to it.
#!/usr/bin/perl
use strict;
use ECSV;
my $this_csv;
my $csv= new ECSV;
$this_csv=$csv->serve("customers", $database, $host, $user, $pass,"freeEmailIssueSentDate is not null");
print "Content-Type: application/msexcel\n";
print "Content-disposition: inline; filename=\"somefile.csv\"\n\n";
print ($this_csv);
exit;
I have a perl script that I downloaded from the web. It allows the user to download data from a mysql file as a .CSV file.
Here's the problem. When I run it using IE on an XP PC, I am prompted to save the file. But when my customer runs it, it never prompts him. Instead it shows all the data in his browser. If he does File/Save as, it put quotes around the data in the text file, so that trying to open it in Excel doesn't parse it.
He is also on an XP PC running IE.
Is this a setting in his browser somewhere? Or is there something I can do differently in my Perl script so that it will definitely prompt him to save the file without showing him the data in his browser?
TIA
Here's the script. The ECSV script simple returns a collection of the data in the file you've passed to it.
#!/usr/bin/perl
use strict;
use ECSV;
my $this_csv;
my $csv= new ECSV;
$this_csv=$csv->serve("customers", $database, $host, $user, $pass,"freeEmailIssueSentDate is not null");
print "Content-Type: application/msexcel\n";
print "Content-disposition: inline; filename=\"somefile.csv\"\n\n";
print ($this_csv);
exit;