Rudy,
> Does anyone know where I can get FREE software that will convert Excel
> files to text files in command line mode ?
Have you considered a perl script? The Spreadsheet::ParseExcel::Simple module is very easy to use.

This might even work for you (no promises there aren't errors):

#!/usr/bin/perl
use Spreadsheet::ParseExcel::Simple;

my $xls = Spreadsheet::ParseExcel::Simple->read('./source.xls');
my $sheet = ($xls->sheets)[0];
my @data='';

open(CSV, ">./destination.txt");
$" = ",";

while ($sheet->has_data) {
 my @data = $sheet->next_row;
 for(i=0; i < @data; i++){
  # Double Quote Quotes
  $data[i] =~ s/"/""/g;

 # Quotes around any field containing commas or double quotes
  if ($data[i] =~ /[,"]/){
$data[i] = "\"$data[i]\""; }
 }
 print CSV "@data\n";
}
close(CSV);



regards,


Craig
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to