title: .xlsx to xml conversion in Perl
body: <p>I am trying to convert a .xlsx file into .xml file. The first row(heading) of .xlsx file would become tags of xml file.</p>
  
  <p>I have written below code which is working fine-</p>
  
  <pre><code> open(XML, "&gt;temp.csv") or die "not able to open $!";
  
   use Spreadsheet::XLSX;
   my $excel = Spreadsheet::XLSX -&gt; new ('test.xlsx');
  
   foreach my $sheet (@{$excel -&gt; {Worksheet}}) {
           $sheet -&gt; {MaxRow} ||= $sheet -&gt; {MinRow};
           foreach my $row ($sheet -&gt; {MinRow} .. $sheet -&gt; {MaxRow}) {
                  $sheet -&gt; {MaxCol} ||= $sheet -&gt; {MinCol};
                  foreach my $col ($sheet -&gt; {MinCol} ..  $sheet -&gt; {MaxCol}) {
                          my $cell = $sheet -&gt; {Cells} [$row] [$col];
                          if ($cell) {
                             print XML $cell -&gt; {Val};
                          }
                          unless($col == $sheet -&gt; {MaxCol}) {print XML ",";} 
                  }
                  unless( $row == $sheet -&gt; {MaxRow}){print XML "\n";}
           }
    }
   close(XML);
   use XML::CSV; 
   my $csv_obj = XML::CSV-&gt;new(); 
      $csv_obj-&gt;parse_doc("temp.csv", {headings =&gt; 1});
      $csv_obj-&gt;print_xml("out.xml");
  </code></pre>
  
  <p>Can anyone suggest a better code(Module) as I have to handle the large .xlsx files.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Man</p>