REG:Printing Border in EXcel


I am trying to print the border in excel through Coding. Is it possible if possible pl guide me it is our client requirement.



Are you using excel automation or Excel buffer?

Did you try to search ?

Thanks Mohana. I am trying to Display the border in one of the data block only for that where i have to write code please suggest me.

Can I come to your place and write it for you?

I have given the link where you can get the help…what else you are expecting from forum?

ExcelBuf.CreateRange(ExcelBuf.GetExcelReference(8)); - Range of cells
ExcelBuf.BorderAround(ExcelBuf.GetExcelReference(8)); - Puts border

Are u using Excel Buffer or Excel Automation ?

For ExcelBuffer :- ExcelBuf.BorderAround(ExcelBuf.GetExcelReference(8))

For Excel Automation :-

xlWorkSheet.Range(‘A’ + FORMAT(ColNo)).VerticalAlignment:=-4108;

xlWorkSheet.Range(‘A’ + FORMAT(ColNo))._BorderAround(1,2,-4105);

Here’s a sample report:
and a vid of what the output looks like (w/ borders)

You can review the report code and see how it’s doing it.

Thanks Amol for ur valuable answer. Problem Solved.