hakonhagland

perl-xlsx-writer-module

Nov 14th, 2021 (edited)
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.53 KB | None | 0 0
  1. # main.pl
  2. use feature qw(say);
  3. use strict;
  4. use warnings;
  5. use Excel::Writer::XLSX;
  6. use lib '.';
  7. use procs;
  8. my $out_xl = 'summary.xlsx';
  9. my $workbook_sum = Excel::Writer::XLSX->new($out_xl);
  10. my $sum_rpt = $workbook_sum->add_worksheet("Summary_report");
  11. my $row = 1;
  12. my $col = 1;
  13. procs::WriteRow($sum_rpt, $row, $col);
  14. $workbook_sum->close();
  15.  
  16. ---------------------
  17.  
  18. # procs.pm
  19. package procs;
  20. use strict;
  21. use warnings;
  22.  
  23. sub WriteRow {
  24.     my ($sum_rpt, $row, $col) = @_;
  25.  
  26.     $sum_rpt->write($row, $col,"abc");
  27. }
  28.  
  29. 1;
  30.  
  31.  
  32.  
Add Comment
Please, Sign In to add comment