We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Change background color on whole column?

Thread ID:

Created:

Updated:

Platform:

Replies:

91904 Dec 9,2009 12:16 AM Dec 9,2009 02:06 AM ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Timothy L Anderson
Asked On December 9, 2009 12:16 AM

If I go inot excel and highligh a whole column by clickingont he column header, then select "Cell Formatting" I can change the background color for the whole column.

Is there a way to do this with XlsIO? I have other formatting for the various cells within the columns already, i do not want to overwrite this, just change the background color for all cells within the column.

--Tim

Pravin Joshua D [Syncfusion]
Replied On December 9, 2009 02:06 AM

Hi Timothy,

Thank you for using Syncfusion products.

Yes. It is possible to change the background color of entire column, without changing the other formatting of cells within the column, using XlsIO. You can use the following code snippet to change the background color.

C#:

sheet.Range["A1"].EntireColumn.CellStyle.ColorIndex=ExcelKnownColors.Aqua;

Please try this and let me know if you have any questions.

Regards,
Pravin Joshua D

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;