in reply to Excel cell commenting?

I can recommend loading your file through Win32::OLE and touching up through it, it works like a dream. I used this method to automate proof-reading text layout for a cell-phone for a large number of different languages:
sub SetErrorState { my($self) = shift; my($Sheet) = $self->{SHEET}; my($row, $col, $err) = @_; my $range = sprintf("%c%d", ord('A') + $col, $row); my $cell = $Sheet->Range($range); if($err) { $cell->ClearComments(); $cell->AddComment($err); $cell->Comment->{Visible} = 0; $cell->Interior->{ColorIndex} = 6; } else { $cell->Interior->{ColorIndex} = xlNone; $cell->ClearComments(); } }

You might spot the ColorIndex thing - that was a bitch... Excel version dependant and all...

Cheers,

---Lars

Replies are listed 'Best First'.
Re: Excel cell commenting?
by monir (Acolyte) on Aug 10, 2004 at 13:55 UTC
    Folks, Thanks everyone for fast response. I will experiment these methods. Regards, -Monir