Excel Interop: BorderAround does not color

Range’s member BorderAround simply crash, when param color is not Type.Missing … means: when you want to set a border color. 😦

A quick tournaround is:

range.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
range.Borders.Color = System.Drawing.ColorTranslator.ToOle(Color.Red);

source: Excel Range.BorderAround(), Border is always black by Stackoverflow

Technorati Tags: , .

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: