my $intStartRow = 0; my $altRow = $intStartRow; my $intStartCol = 2; my $altCol = $intStartCol; open (FRUITS, '/home/fruit_types.txt') or die ("Problem opening file: $!"); # Fruit Header Insertion my $row = 1; while () { chomp; # Split on single tab my @Fld = split ('\t', $_); my $col = 3; foreach my $token (@Fld) { $worksheet->write($altRow, $altCol++, $token, $format); $col++; } $row++; }