473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Spreadsheet::WriteExcel Error while generating an excel sheet

Hi Gurus,

I am in need of your guidance.
I have installed Perl5.8.8 on my server running with SunOS 5.8
and then I installed Spreadsheet::WriteExcel perl module. It has been installed successfully. Howver when I try to run a command to check whether it emails an excel sheet or not, it showed me the below.

# /home/oracle8/oradba/admin/utils/sqlplus2xls/sqlplus2xls.pl

ERROR (Missing Parameter): <config_file> not specified!

Usage: perl /home/oracle8/oradba/admin/utils/sqlplus2xls/sqlplus2xls.pl

<config_file>
#

Any help will be greatly appreceiated.

Thanks,
Vithya
Oct 5 '07 #1
5 2800
numberwhun
3,509 Expert Mod 2GB
Hi Gurus,

I am in need of your guidance.
I have installed Perl5.8.8 on my server running with SunOS 5.8
and then I installed Spreadsheet::WriteExcel perl module. It has been installed successfully. Howver when I try to run a command to check whether it emails an excel sheet or not, it showed me the below.

# /home/oracle8/oradba/admin/utils/sqlplus2xls/sqlplus2xls.pl

ERROR (Missing Parameter): <config_file> not specified!

Usage: perl /home/oracle8/oradba/admin/utils/sqlplus2xls/sqlplus2xls.pl

<config_file>
#

Any help will be greatly appreceiated.

Thanks,
Vithya

You have posted your question under Perl Articles instead of the Perl Forum.
I have moved it across for you.

Please be sure that ALL questions get posted to the forum as the Articles section is for things like tutorials, not help/assistance!

- MODERATOR
Oct 5 '07 #2
numberwhun
3,509 Expert Mod 2GB
Hi Gurus,

I am in need of your guidance.
I have installed Perl5.8.8 on my server running with SunOS 5.8
and then I installed Spreadsheet::WriteExcel perl module. It has been installed successfully. Howver when I try to run a command to check whether it emails an excel sheet or not, it showed me the below.

# /home/oracle8/oradba/admin/utils/sqlplus2xls/sqlplus2xls.pl

ERROR (Missing Parameter): <config_file> not specified!

Usage: perl /home/oracle8/oradba/admin/utils/sqlplus2xls/sqlplus2xls.pl

<config_file>
#

Any help will be greatly appreceiated.

Thanks,
Vithya
First, is this something that you coded? I ask because if you coded this script to accept and check for a config file, then you should know to supply it.

The script seems to check for it. I would examine the code and see what it is expecting. Did this script come with instructions for usage when you downloaded it?

You may want to post the code here (in proper code tags please) so we can see what it is expecting and maybe assist you.

Regards,

Jeff
Oct 5 '07 #3
First, is this something that you coded? I ask because if you coded this script to accept and check for a config file, then you should know to supply it.

The script seems to check for it. I would examine the code and see what it is expecting. Did this script come with instructions for usage when you downloaded it?

You may want to post the code here (in proper code tags please) so we can see what it is expecting and maybe assist you.

Regards,

Jeff
Thanks for your reply,

Below is the code, please have a look,

Expand|Select|Wrap|Line Numbers
  1. # more sqlplus2xls.pl
  2. #!/usr/local/bin/perl
  3. ################################################################
  4. # INCLUDED LIBRARY FILES
  5. use lib '/home/oracle8/oradba/admin/utils/sqlplus2xls';
  6. use strict;
  7. use Spreadsheet::WriteExcel;
  8. ################################################################
  9. # CONSTANTS AND GLOBAL VARIABLES
  10. my $pth = "/home/oracle8/oradba/admin/utils/sqlplus2xls";
  11. my ($orclhome, $sqlfile, $spool, $batfile, $xlsfile) = undef;
  12. my ($i, $j, $k, $daycnt, $col) = 0;
  13. my (@datarec, @recipients, @tmp) = undef;
  14. my ($workbook, $f, $c1, $msg, $usg, $sidname, $miss_param,
  15.     $cfgfile, @tabname) = undef;
  16. my (@fldVisible,@fldNam,@fldHdrNam,@fldWdth,@fldType,
  17.     @fldDesc, @tablename, @fld_order, @where, @build_dict) = undef;
  18. ################################################################
  19. # FUNCTION DECLARATIONS & DEFINITIONS
  20. # --------------------------------------------------------------
  21. # BuildQuery()
  22. # --------------------------------------------------------------
  23. # BuildDictionary()
  24. ################################################################
  25.  
  26. ################################################################
  27. #---------------------------------------------------------------
  28. # FUNCTION   Main
  29. # ARGUMENTS  <cfg file>
  30. # RETURNS    sends excel file as an email attachment
  31. # EXPECTS    arguments indicating the config file
  32. # DOES       creates an excel file containing query information
  33. #            defined in config file
  34. #
  35. #---------------------------------------------------------------
  36. $cfgfile     = ((@ARGV) && ($ARGV[0]))      ? $ARGV[0]             : 'none' ;
  37. $miss_param  = ($cfgfile =~ m/none/)        ? " <config_file>"     : "" ;
  38.  
  39. if (length($miss_param) > 0) {
  40.     $msg = "\nERROR (Missing Parameter): $miss_param not specified!\n";
  41.     $usg = "\n\tUsage: perl $0 <config_file>\n";
  42.     print STDOUT "$msg$usg";
  43.     exit(0);
  44. }
  45. # Load Configuration File
  46. $cfgfile = "$pth/$cfgfile";
  47. open CFG, "<$cfgfile" or die "Can't open $cfgfile \n";
  48. my $row = 0;
  49. while (<CFG>)
  50.  {
  51.     chomp($_);
  52.     if ($_ =~ m/^\#/) { }
  53.     elsif ($_ =~ m/^ORACLE_SID/)     { @tmp = split(/\^/,$_); $sidname = $tmp[1]; }
  54.     elsif ($_ =~ m/^ORACLE_HOME/)    { @tmp = split(/\^/,$_); $orclhome = $tmp[1]; }
  55.     elsif ($_ =~ m/^TABNAME/)        { @tabname    = split(/\^/,$_); }
  56.     elsif ($_ =~ m/^XLS_FILE_NAME/)  { @tmp = split(/\^/,$_); $xlsfile  = "$tmp[1]"; }
  57.     elsif ($_ =~ m/^SQLFILE/)        { @tmp = split(/\^/,$_); $sqlfile  = "$pth/$tmp[1]" }
  58.     elsif ($_ =~ m/^SPOOLFILE/)      { @tmp = split(/\^/,$_); $spool    = "$pth/$tmp[1]" }
  59.     elsif ($_ =~ m/^BATFILE/)        { @tmp = split(/\^/,$_); $batfile  = "$pth/$tmp[1]" }
  60.  
  61.     elsif ($_ =~ m/^TABLE/)          { @tablename  = split(/\^/,$_); }
  62.     elsif ($_ =~ m/^ORDER_CLAUSE/)   { @fld_order  = split(/\^/,$_); }
  63.     elsif ($_ =~ m/^BUILD_DICT/)     { @build_dict = split(/\^/,$_); }
  64.     elsif ($_ =~ m/^EMAIL_TO/)       { @tmp        = split(/\^/,$_);
  65.                                        @recipients = split(/\:/, $tmp[1]);  }
  66.     elsif ($_ =~ m/^WHERE_CLAUSE/)   { @where      = split(/\^/,$_); }
  67.     else {
  68.         ($fldVisible[$row], $fldNam[$row],  $fldHdrNam[$row],
  69.          $fldWdth[$row],    $fldType[$row], $fldDesc[$row]    ) = split(/\^/,$_);
  70.         $fldVisible[$row] =~ s/^\s*(.*?)\s*$/$1/;
  71.         $fldNam[$row]     =~ s/^\s*(.*?)\s*$/$1/;
  72.         $fldHdrNam[$row]  =~ s/^\s*(.*?)\s*$/$1/;
  73.         $fldWdth[$row]    =~ s/^\s*(.*?)\s*$/$1/;
  74.         $fldType[$row]    =~ s/^\s*(.*?)\s*$/$1/;
  75.         $fldDesc[$row]    =~ s/^\s*(.*?)\s*$/$1/;
  76.         $row++;
  77.     }
  78.  }
  79. close CFG;
  80.  
  81. $workbook  = Spreadsheet::WriteExcel->new("$xlsfile");
  82. $f = $workbook->addformat();
  83. $f->set_text_wrap();
  84. $c1=$workbook->addformat(color=>'Black',bg_color=>'Gray',font=>'Arial',size=>12,bold=>1,);
  85. $ENV{ORACLE_SID} = "$sidname";
  86. $ENV{ORACLE_HOME} = "$orclhome";
  87. open SQL, ">$sqlfile" or die "Could not open temp sql file ($sqlfile). \nStopped";
  88. if ($build_dict[1] =~ m/^Y/) { BuildDictionary($workbook, \@fldHdrNam, \@fldType, \@fldDesc, \@fldVisible); }
  89. my $w = $workbook->addworksheet("$tabname[1]");
  90. $col = 0;
  91. for ($i=0; $i<=$#fldHdrNam; $i++) {
  92.     if ($fldVisible[$i] =~ m/Y/) {
  93.         $w->write(0,$col,$fldHdrNam[$i],$c1);
  94.         $w->set_column( $col, $col,$fldWdth[$i]);
  95.         $col++;
  96.     }
  97. }
  98. $w->freeze_panes(1, 0); # Freeze the header row
  99.  
  100. print SQL BuildQuery($spool, $daycnt, \@fldNam, $tablename[1], $fld_order[1], $where[1]);
  101. close SQL;
  102. open BAT, ">$batfile" or die "Could not open temp bat file ($batfile). \nStopped";
  103. print BAT "$orclhome/bin/sqlplus / @", "$sqlfile\n";
  104. close BAT;
  105. chmod 0744, $batfile;
  106. system($batfile);
  107. open SPOOL, "<$spool" or die "Can't open $spool \n";
  108. $row = 1;
  109. while (<SPOOL>)
  110.  {
  111.     chomp($_);
  112.     @datarec = split(/\^/,$_);
  113.     $col = 0;
  114.     for ($i=0;$i<=$#datarec;$i++) {
  115.          $datarec[$i] =~ s/^\s*(.*?)\s*$/$1/;
  116.          if ($fldVisible[$i] =~ m/Y/) {
  117.              $w->write($row,$col,$datarec[$i],$f);
  118.              $col++;
  119.          }
  120.     }
  121.     $row++;
  122.  }
  123. close SPOOL;
  124. $workbook->close() or die "Error closing file: $!";
  125.  
  126. print "\nSending Mail.............\n";
  127. for ($i=0;$i<=$#recipients;$i++) {
  128.   system("(uuencode $xlsfile $xlsfile) | mailx -s Audit_$sidname@`hostname` $recipients[$i]\;");
  129. }
  130. print "\nProcess Complete!\n";
  131. exit(0);
  132. ################################################################
  133. # End of Main
  134. ################################################################
  135. #---------------------------------------------------------------
  136. # FUNCTION   BuildQuery
  137. # ARGUMENTS
  138. # RETURNS    query string
  139. #
  140. # DOES
  141. #---------------------------------------------------------------
  142. sub BuildQuery
  143. {
  144.  my $spoolfile = (@_) ?   $_[0]  : undef ;
  145.  my $daycnt    = (@_) ?   $_[1]  : 7 ;
  146.  my @flds      = (@_) ? @{$_[2]} : undef ;
  147.  my $tablename = (@_) ?   $_[3]  : undef ;
  148.  my $fldorder  = (@_) ?   $_[4]  : undef ;
  149.  my $where     = (@_) ?   $_[5]  : undef ;
  150.  my ($sql, $i) = undef;
  151.  $sql  = "SET LINESIZE 19000 \n";
  152.  #SET FLUSH OFF
  153.  $sql .= "SET TERMOUT OFF \n";
  154.  #SET TRIMS ON DOCUMENT OFF
  155.  $sql .= "set pagesize 0 \n";
  156.  $sql .= "set heading off \n";
  157.  $sql .= "set feedback off \n";
  158.  $sql .= "SET ECHO OFF \n";
  159.  $sql .= "SET WRAP OFF \n";
  160.  $sql .= "set colsep ^ \n";
  161.  $sql .= "spool $spoolfile \n";
  162.  $sql .= "select ";
  163.  for ($i=0;$i<=$#flds;$i++) {
  164.      $sql .= "$flds[$i]";
  165.      $sql .= (($i==$#flds)) ? "" : "," ;
  166.  }
  167.  $sql .= " FROM $tablename \n";
  168.  $sql .= " WHERE $where \n";
  169.  $sql .= "order by $fldorder ; \n";
  170.  $sql .= "spool off \n";
  171.  $sql .= "exit \n";
  172.  return $sql;
  173. }
  174. #---------------------------------------------------------------
  175. # FUNCTION   BuildDictionary
  176. # ARGUMENTS
  177. # RETURNS
  178. #
  179. # DOES
  180. #---------------------------------------------------------------
  181. sub BuildDictionary
  182. {
  183.  my $workbook = (@_) ?   $_[0]  : undef ;
  184.  my @hdrs     = (@_) ?   @{$_[1]}  : undef ;
  185.  my @typ      = (@_) ?   @{$_[2]}  : undef ;
  186.  my @desc     = (@_) ?   @{$_[3]}  : undef ;
  187.  my @visible  = (@_) ?   @{$_[4]}  : undef ;
  188.  my $w = $workbook->addworksheet("Dictionary");
  189.  my $f = $workbook->addformat(color=>'Black',bg_color=>'Gray',font=>'Arial',size=>12,bold=>1,);
  190.  my ($col, $row) = 0;
  191.  
  192.  $w->set_column(0,0,20);
  193.  $w->set_column(1,1,20);
  194.  $w->set_column(2,2,60);
  195.  for ($col=0;$col<=$#hdrs;$col++) {
  196.      if ($fldVisible[$col] =~ m/Y/) {
  197.          $w->write( $row,0,$hdrs[$col],$f);
  198.          $w->write( $row,1,$typ[$col]);
  199.          $w->write( $row,2,$desc[$col]);
  200.          $row++;
  201.      }
  202.  }
  203. }
  204. #********************************************************************
  205.  
  206. #
  207.  
Oct 5 '07 #4
numberwhun
3,509 Expert Mod 2GB
Thanks for your reply,

Below is the code, please have a look,

Expand|Select|Wrap|Line Numbers
  1. # more sqlplus2xls.pl
  2. #!/usr/local/bin/perl
  3. ################################################################
  4. # INCLUDED LIBRARY FILES
  5. use lib '/home/oracle8/oradba/admin/utils/sqlplus2xls';
  6. use strict;
  7. use Spreadsheet::WriteExcel;
  8. ################################################################
  9. # CONSTANTS AND GLOBAL VARIABLES
  10. my $pth = "/home/oracle8/oradba/admin/utils/sqlplus2xls";
  11. my ($orclhome, $sqlfile, $spool, $batfile, $xlsfile) = undef;
  12. my ($i, $j, $k, $daycnt, $col) = 0;
  13. my (@datarec, @recipients, @tmp) = undef;
  14. my ($workbook, $f, $c1, $msg, $usg, $sidname, $miss_param,
  15.     $cfgfile, @tabname) = undef;
  16. my (@fldVisible,@fldNam,@fldHdrNam,@fldWdth,@fldType,
  17.     @fldDesc, @tablename, @fld_order, @where, @build_dict) = undef;
  18. ################################################################
  19. # FUNCTION DECLARATIONS & DEFINITIONS
  20. # --------------------------------------------------------------
  21. # BuildQuery()
  22. # --------------------------------------------------------------
  23. # BuildDictionary()
  24. ################################################################
  25.  
  26. ################################################################
  27. #---------------------------------------------------------------
  28. # FUNCTION   Main
  29. # ARGUMENTS  <cfg file>
  30. # RETURNS    sends excel file as an email attachment
  31. # EXPECTS    arguments indicating the config file
  32. # DOES       creates an excel file containing query information
  33. #            defined in config file
  34. #
  35. #---------------------------------------------------------------
  36. $cfgfile     = ((@ARGV) && ($ARGV[0]))      ? $ARGV[0]             : 'none' ;
  37. $miss_param  = ($cfgfile =~ m/none/)        ? " <config_file>"     : "" ;
  38.  
  39. if (length($miss_param) > 0) {
  40.     $msg = "\nERROR (Missing Parameter): $miss_param not specified!\n";
  41.     $usg = "\n\tUsage: perl $0 <config_file>\n";
  42.     print STDOUT "$msg$usg";
  43.     exit(0);
  44. }
  45. # Load Configuration File
  46. $cfgfile = "$pth/$cfgfile";
  47. open CFG, "<$cfgfile" or die "Can't open $cfgfile \n";
  48. my $row = 0;
  49. while (<CFG>)
  50.  {
  51.     chomp($_);
  52.     if ($_ =~ m/^\#/) { }
  53.     elsif ($_ =~ m/^ORACLE_SID/)     { @tmp = split(/\^/,$_); $sidname = $tmp[1]; }
  54.     elsif ($_ =~ m/^ORACLE_HOME/)    { @tmp = split(/\^/,$_); $orclhome = $tmp[1]; }
  55.     elsif ($_ =~ m/^TABNAME/)        { @tabname    = split(/\^/,$_); }
  56.     elsif ($_ =~ m/^XLS_FILE_NAME/)  { @tmp = split(/\^/,$_); $xlsfile  = "$tmp[1]"; }
  57.     elsif ($_ =~ m/^SQLFILE/)        { @tmp = split(/\^/,$_); $sqlfile  = "$pth/$tmp[1]" }
  58.     elsif ($_ =~ m/^SPOOLFILE/)      { @tmp = split(/\^/,$_); $spool    = "$pth/$tmp[1]" }
  59.     elsif ($_ =~ m/^BATFILE/)        { @tmp = split(/\^/,$_); $batfile  = "$pth/$tmp[1]" }
  60.  
  61.     elsif ($_ =~ m/^TABLE/)          { @tablename  = split(/\^/,$_); }
  62.     elsif ($_ =~ m/^ORDER_CLAUSE/)   { @fld_order  = split(/\^/,$_); }
  63.     elsif ($_ =~ m/^BUILD_DICT/)     { @build_dict = split(/\^/,$_); }
  64.     elsif ($_ =~ m/^EMAIL_TO/)       { @tmp        = split(/\^/,$_);
  65.                                        @recipients = split(/\:/, $tmp[1]);  }
  66.     elsif ($_ =~ m/^WHERE_CLAUSE/)   { @where      = split(/\^/,$_); }
  67.     else {
  68.         ($fldVisible[$row], $fldNam[$row],  $fldHdrNam[$row],
  69.          $fldWdth[$row],    $fldType[$row], $fldDesc[$row]    ) = split(/\^/,$_);
  70.         $fldVisible[$row] =~ s/^\s*(.*?)\s*$/$1/;
  71.         $fldNam[$row]     =~ s/^\s*(.*?)\s*$/$1/;
  72.         $fldHdrNam[$row]  =~ s/^\s*(.*?)\s*$/$1/;
  73.         $fldWdth[$row]    =~ s/^\s*(.*?)\s*$/$1/;
  74.         $fldType[$row]    =~ s/^\s*(.*?)\s*$/$1/;
  75.         $fldDesc[$row]    =~ s/^\s*(.*?)\s*$/$1/;
  76.         $row++;
  77.     }
  78.  }
  79. close CFG;
  80.  
  81. $workbook  = Spreadsheet::WriteExcel->new("$xlsfile");
  82. $f = $workbook->addformat();
  83. $f->set_text_wrap();
  84. $c1=$workbook->addformat(color=>'Black',bg_color=>'Gray',font=>'Arial',size=>12,bold=>1,);
  85. $ENV{ORACLE_SID} = "$sidname";
  86. $ENV{ORACLE_HOME} = "$orclhome";
  87. open SQL, ">$sqlfile" or die "Could not open temp sql file ($sqlfile). \nStopped";
  88. if ($build_dict[1] =~ m/^Y/) { BuildDictionary($workbook, \@fldHdrNam, \@fldType, \@fldDesc, \@fldVisible); }
  89. my $w = $workbook->addworksheet("$tabname[1]");
  90. $col = 0;
  91. for ($i=0; $i<=$#fldHdrNam; $i++) {
  92.     if ($fldVisible[$i] =~ m/Y/) {
  93.         $w->write(0,$col,$fldHdrNam[$i],$c1);
  94.         $w->set_column( $col, $col,$fldWdth[$i]);
  95.         $col++;
  96.     }
  97. }
  98. $w->freeze_panes(1, 0); # Freeze the header row
  99.  
  100. print SQL BuildQuery($spool, $daycnt, \@fldNam, $tablename[1], $fld_order[1], $where[1]);
  101. close SQL;
  102. open BAT, ">$batfile" or die "Could not open temp bat file ($batfile). \nStopped";
  103. print BAT "$orclhome/bin/sqlplus / @", "$sqlfile\n";
  104. close BAT;
  105. chmod 0744, $batfile;
  106. system($batfile);
  107. open SPOOL, "<$spool" or die "Can't open $spool \n";
  108. $row = 1;
  109. while (<SPOOL>)
  110.  {
  111.     chomp($_);
  112.     @datarec = split(/\^/,$_);
  113.     $col = 0;
  114.     for ($i=0;$i<=$#datarec;$i++) {
  115.          $datarec[$i] =~ s/^\s*(.*?)\s*$/$1/;
  116.          if ($fldVisible[$i] =~ m/Y/) {
  117.              $w->write($row,$col,$datarec[$i],$f);
  118.              $col++;
  119.          }
  120.     }
  121.     $row++;
  122.  }
  123. close SPOOL;
  124. $workbook->close() or die "Error closing file: $!";
  125.  
  126. print "\nSending Mail.............\n";
  127. for ($i=0;$i<=$#recipients;$i++) {
  128.   system("(uuencode $xlsfile $xlsfile) | mailx -s Audit_$sidname@`hostname` $recipients[$i]\;");
  129. }
  130. print "\nProcess Complete!\n";
  131. exit(0);
  132. ################################################################
  133. # End of Main
  134. ################################################################
  135. #---------------------------------------------------------------
  136. # FUNCTION   BuildQuery
  137. # ARGUMENTS
  138. # RETURNS    query string
  139. #
  140. # DOES
  141. #---------------------------------------------------------------
  142. sub BuildQuery
  143. {
  144.  my $spoolfile = (@_) ?   $_[0]  : undef ;
  145.  my $daycnt    = (@_) ?   $_[1]  : 7 ;
  146.  my @flds      = (@_) ? @{$_[2]} : undef ;
  147.  my $tablename = (@_) ?   $_[3]  : undef ;
  148.  my $fldorder  = (@_) ?   $_[4]  : undef ;
  149.  my $where     = (@_) ?   $_[5]  : undef ;
  150.  my ($sql, $i) = undef;
  151.  $sql  = "SET LINESIZE 19000 \n";
  152.  #SET FLUSH OFF
  153.  $sql .= "SET TERMOUT OFF \n";
  154.  #SET TRIMS ON DOCUMENT OFF
  155.  $sql .= "set pagesize 0 \n";
  156.  $sql .= "set heading off \n";
  157.  $sql .= "set feedback off \n";
  158.  $sql .= "SET ECHO OFF \n";
  159.  $sql .= "SET WRAP OFF \n";
  160.  $sql .= "set colsep ^ \n";
  161.  $sql .= "spool $spoolfile \n";
  162.  $sql .= "select ";
  163.  for ($i=0;$i<=$#flds;$i++) {
  164.      $sql .= "$flds[$i]";
  165.      $sql .= (($i==$#flds)) ? "" : "," ;
  166.  }
  167.  $sql .= " FROM $tablename \n";
  168.  $sql .= " WHERE $where \n";
  169.  $sql .= "order by $fldorder ; \n";
  170.  $sql .= "spool off \n";
  171.  $sql .= "exit \n";
  172.  return $sql;
  173. }
  174. #---------------------------------------------------------------
  175. # FUNCTION   BuildDictionary
  176. # ARGUMENTS
  177. # RETURNS
  178. #
  179. # DOES
  180. #---------------------------------------------------------------
  181. sub BuildDictionary
  182. {
  183.  my $workbook = (@_) ?   $_[0]  : undef ;
  184.  my @hdrs     = (@_) ?   @{$_[1]}  : undef ;
  185.  my @typ      = (@_) ?   @{$_[2]}  : undef ;
  186.  my @desc     = (@_) ?   @{$_[3]}  : undef ;
  187.  my @visible  = (@_) ?   @{$_[4]}  : undef ;
  188.  my $w = $workbook->addworksheet("Dictionary");
  189.  my $f = $workbook->addformat(color=>'Black',bg_color=>'Gray',font=>'Arial',size=>12,bold=>1,);
  190.  my ($col, $row) = 0;
  191.  
  192.  $w->set_column(0,0,20);
  193.  $w->set_column(1,1,20);
  194.  $w->set_column(2,2,60);
  195.  for ($col=0;$col<=$#hdrs;$col++) {
  196.      if ($fldVisible[$col] =~ m/Y/) {
  197.          $w->write( $row,0,$hdrs[$col],$f);
  198.          $w->write( $row,1,$typ[$col]);
  199.          $w->write( $row,2,$desc[$col]);
  200.          $row++;
  201.      }
  202.  }
  203. }
  204. #********************************************************************
  205.  
  206. #
  207.  
First, please do not top post (place your reply ABOVE the quoted text you are replying to). If you do this,

?
about
talking
are
you
what
know
anyone
will
how

Second, in my post, I specifically asked that you place the proper code tags around your code. And example of the code tags is always provided for you in the "REPLY GUIDELINES" to the right of the Message window when replying. Please use them in the future for all code that you post here on TSDN.

Thank you!

Regards,

Jeff
Oct 5 '07 #5
Sorry for that, As this is the first time, I am using this site.

Vithya

First, please do not top post (place your reply ABOVE the quoted text you are replying to). If you do this,

?
about
talking
are
you
what
know
anyone
will
how

Second, in my post, I specifically asked that you place the proper code tags around your code. And example of the code tags is always provided for you in the "REPLY GUIDELINES" to the right of the Message window when replying. Please use them in the future for all code that you post here on TSDN.

Thank you!

Regards,

Jeff
Oct 5 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dorthe Luebbert | last post by:
Hi, there is a new(er) version of John McNammara's Excel package for Perl: http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-0.49.7.tar.gz The package writes Excel97...
2
by: Fabio | last post by:
Hello, there's a module called Spreadsheet::WriteExcel. It allows me to create a new worksheet and edit its cells: my $workbook = Spreadsheet::WriteExcel->new('my.xls'); my $worksheet =...
1
by: Jer | last post by:
Using an access project front-end to an MSDE database, I'm trying to import a spreadsheet using File->Get External Data->Import. After I select the spreadsheet name, I tell it I want to import into...
4
by: tito | last post by:
I am using Active Perl for running perl programs.I am finding difficulty in installing Spreadsheet::WriteExcel,Spreadsheet:ParseExcel to the machine for writing a program which will retrieve data...
5
by: rasmitasah25 | last post by:
hi, I am very new to perl.I have written a perl script which is writing data into an excel file.The problem is that it is creating one new excel file while executing but my need id to write into...
5
by: Sport Girl | last post by:
Hi again my great online assistants, just would like to say that i'm testing the script under unix , and after researches on the internet, i have realised that to resolve 500 Internal Server Error,...
8
by: Perl Beginner | last post by:
I am using Win32. I have created an excel spreadsheet, formatted the columns and rows, and would like to write to the cells…all of this using Spreadsheet::WriteExcel. My issue is, my script is very...
2
by: lavsaxena | last post by:
Can we edit a worksheet of excel through spreadsheet::writeExcel. Because when I am using my $workbook = Spreadsheet::WriteExcel->new('D:\test_result.xls'); this statement is creating the...
7
by: somsub | last post by:
Hi, When I tried to open excel sheet created by below code with MSexcel it showing "Unable to read file " error . use Spreadsheet::WriteExcel; $workbook =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.