anbutechie has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
use Win32::OLE; $Excel = Win32::OLE->new("Excel.Application") || die "Could not start +Excel.Application\n"; $Excel->{visible} = 1; # get a new workbook $book =$Excel->Workbooks->Add; $sheet = $book->Worksheets(1); $sheet->Cells(1,2)->{Value} ="test";
How can i set bold to perticular cell say cell(2,3)?
Regards,
Anbarasu

Replies are listed 'Best First'.
Re: How to set bold /underline to perticular cell in excel?
by VinsWorldcom (Prior) on Mar 18, 2009 at 14:48 UTC
    $sheet->Cells(2,3)->Font->{Bold} = "True";
Re: How to set bold /underline to perticular cell in excel?
by imrags (Monk) on Mar 19, 2009 at 06:46 UTC
    Some extra code snippets :)
    $Sheet2->Range("B2:D2")->Merge; $Sheet2->Range("B2:D2")->Font->{Bold} = "True"; $Sheet2->Range("A4:E11")->Select; $Sheet2->Range("A4:E11")->Borders(xlEdgeLeft)->{LineStyle} = xlContin +uous; $Sheet2->Range("A4:E11")->Borders(xlEdgeTop)->{LineStyle} = xlContinu +ous; $Sheet2->Range("A4:E11")->Borders(xlEdgeRight)->{LineStyle} = xlConti +nuous; $Sheet2->Range("A4:E11")->Borders(xlEdgeBottom)->{LineStyle} = xlCont +inuous; $Sheet2->Range("A4:E11")->Borders(xlInsideVertical)-> {Weight} = xlThi +n; $Sheet2->Range("A4:E11")->Borders(xlInsideHorizontal)-> {Weight} = xlT +hin; $Sheet2 -> Range("A4:E4") -> {Columns} -> Autofit; $Sheet2 -> Range("A4:E4")->{ColumnWidth}->Autofit; #####---------COLORS TO USE IF NEEDED--- $Sheet2->Range("C7:C7")->Interior->{ColorIndex} = 4; $Sheet2->Range("C8:C8")->Interior->{ColorIndex}= 37; $Sheet2->Range("C9:C9")->Interior->{ColorIndex} =3;
    Raghu