<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071327#M140740</link>
    <description>Hi!&lt;BR /&gt;I thing, this will help:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;    use strict;&lt;BR /&gt;    use Spreadsheet::WriteExcel;&lt;BR /&gt;&lt;BR /&gt;    # Check for valid number of arguments&lt;BR /&gt;    if (($#ARGV &amp;lt; 1) || ($#ARGV &amp;gt; 2)) {&lt;BR /&gt;       die("Usage: tab2xls tabfile.txt newfile.xls\n");&lt;BR /&gt;    };&lt;BR /&gt;&lt;BR /&gt;    # Open the tab-delimited file&lt;BR /&gt;    open (TABFILE, $ARGV[0]) or die "$ARGV[0]: $!";&lt;BR /&gt;&lt;BR /&gt;    # Create a new Excel workbook&lt;BR /&gt;    my $workbook  = Spreadsheet::WriteExcel-&amp;gt;new($ARGV[1]);&lt;BR /&gt;    my $worksheet = $workbook-&amp;gt;addworksheet();&lt;BR /&gt;    # Row and column are zero indexed&lt;BR /&gt;    my $row = 0;&lt;BR /&gt;&lt;BR /&gt;    while (&lt;TABFILE&gt;) {&lt;BR /&gt;       chomp;&lt;BR /&gt;       # Split on single tab&lt;BR /&gt;       my @Fld = split('\t', $_);&lt;BR /&gt;&lt;BR /&gt;       my $col = 0;&lt;BR /&gt;       foreach my $token (@Fld) {&lt;BR /&gt;           $worksheet-&amp;gt;write($row, $col, $token);&lt;BR /&gt;           $col++;&lt;BR /&gt;       }&lt;BR /&gt;       $row++;&lt;BR /&gt;&lt;BR /&gt;Regards,Stan&lt;BR /&gt;&lt;/TABFILE&gt;</description>
    <pubDate>Mon, 15 Sep 2003 14:38:38 GMT</pubDate>
    <dc:creator>Stanimir</dc:creator>
    <dc:date>2003-09-15T14:38:38Z</dc:date>
    <item>
      <title>Perl problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071325#M140738</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I am using the perl module Spreadsheet::WriteExcel to write data to an xls file. &lt;BR /&gt;&lt;BR /&gt;I know how to write individual data to a new file, but can anyone tell me how to write the contents of a data file (eg a text file) to a new xls file using the module ?</description>
      <pubDate>Mon, 15 Sep 2003 14:29:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071325#M140738</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-15T14:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Perl problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071326#M140739</link>
      <description>Microsoft is a little secretive about how to create excel files without licensing excel.&lt;BR /&gt;&lt;BR /&gt;The easiet way to go is to write it out ascii text, perhaps comma delimited, so excel can properly import it.&lt;BR /&gt;&lt;BR /&gt;This will not help much with forumlas though.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 15 Sep 2003 14:36:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071326#M140739</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-15T14:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Perl problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071327#M140740</link>
      <description>Hi!&lt;BR /&gt;I thing, this will help:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;    use strict;&lt;BR /&gt;    use Spreadsheet::WriteExcel;&lt;BR /&gt;&lt;BR /&gt;    # Check for valid number of arguments&lt;BR /&gt;    if (($#ARGV &amp;lt; 1) || ($#ARGV &amp;gt; 2)) {&lt;BR /&gt;       die("Usage: tab2xls tabfile.txt newfile.xls\n");&lt;BR /&gt;    };&lt;BR /&gt;&lt;BR /&gt;    # Open the tab-delimited file&lt;BR /&gt;    open (TABFILE, $ARGV[0]) or die "$ARGV[0]: $!";&lt;BR /&gt;&lt;BR /&gt;    # Create a new Excel workbook&lt;BR /&gt;    my $workbook  = Spreadsheet::WriteExcel-&amp;gt;new($ARGV[1]);&lt;BR /&gt;    my $worksheet = $workbook-&amp;gt;addworksheet();&lt;BR /&gt;    # Row and column are zero indexed&lt;BR /&gt;    my $row = 0;&lt;BR /&gt;&lt;BR /&gt;    while (&lt;TABFILE&gt;) {&lt;BR /&gt;       chomp;&lt;BR /&gt;       # Split on single tab&lt;BR /&gt;       my @Fld = split('\t', $_);&lt;BR /&gt;&lt;BR /&gt;       my $col = 0;&lt;BR /&gt;       foreach my $token (@Fld) {&lt;BR /&gt;           $worksheet-&amp;gt;write($row, $col, $token);&lt;BR /&gt;           $col++;&lt;BR /&gt;       }&lt;BR /&gt;       $row++;&lt;BR /&gt;&lt;BR /&gt;Regards,Stan&lt;BR /&gt;&lt;/TABFILE&gt;</description>
      <pubDate>Mon, 15 Sep 2003 14:38:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071327#M140740</guid>
      <dc:creator>Stanimir</dc:creator>
      <dc:date>2003-09-15T14:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perl problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071328#M140741</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Thanks for that - I now know that the package has useful examples.</description>
      <pubDate>Mon, 15 Sep 2003 15:36:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem/m-p/3071328#M140741</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-15T15:36:00Z</dc:date>
    </item>
  </channel>
</rss>

