.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> File Operation >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Providing line style in excel

Posted By:nishithraj       Posted Date: December 27, 2009    Points: 10    Category: File Operation    URL: http://www.dotnetspark.com  

We can specify the line style of an excel cell or row through the excel interop component.,

It has different styles we can select the style as we require.

Following is the code for the line creation style.

//For a single cell
oRng = sheet.get_Range("P18", "P18");
//Alignement also we can specify here
oRng.HorizontalAlignment = Excel.XlHAlign.xlHAlignLeft;
oRng.Font.Size = 8;
//line style as doube
oRng.Borders.get_Item(Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlDouble;


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend