When I set visible to 1 and pause after RefreshAll() the excel sheet has all of its data. I also tried making
my $LastRow = $Sheet->UsedRange->Find({What=>"*",
SearchDirection=>xlPrevious,
SearchOrder=>xlByRows})->{Row};
my $LastCol = $Sheet->UsedRange->Find({What=>"*",
SearchDirection=>xlPrevious,
SearchOrder=>xlByColumns})->{Column};
constants, but then the code gets stuck with the same error on
$hasher[$r-2]{ $Sheet->Range($c.'1')->{Value} } = $Sheet->Range($c.$r)->{Value}; However, in this second case, if I run it twice in a row, it works... the only difference I see between runs is that excel is still open from the first run because Perl didn't reach the 'close()' line, but this didn't fix the first case (without constants). |