binmode(STDOUT,':encoding(UTF-8)');
print $input->header(-type => 'application/vnd.ms-excel', -attachment => 'export_' . $framework_name . '.csv');
print $strXml;
- } elsif ($format eq 'excel') {
- # Excel-xml file
- print $input->header(-type => 'application/excel', -attachment => 'export_' . $framework_name . '.xml');
- print $strXml;
} else {
# ODS file
my $strODS = '';
my $fieldname = 'file_import_' . $framework_name;
my $filename = $input->param($fieldname);
# upload the input file
- if ($filename && $filename =~ /\.(csv|ods|xml)$/i) {
+ if ($filename && $filename =~ /\.(csv|ods)$/i) {
my $extension = $1;
my $uploadFd = $input->upload($fieldname);
if ($uploadFd && !$input->cgi_error) {