Free Support Forum -

Getting background colours

I have an ASP.NET application which reads an Excel spreadsheet into a SQL Server database. The spreadsheet is used by our HR dept to maintain absence information, and consists of a worksheet for each employee, with a calendar on each worksheet. They indicate the type of absence by changing the background colour of the cell(s) representing the date(s) of the absence.

My program has to read the background colour and convert that into an absence code to insert into the database.

I have written a VB.NET program which uses Excel, and this works fine, except that it takes about 15 minutes to run.

I came across your application, and it looked like the ideal solution to speed things up, especially if I can run it in a thread to monitor its progress, and also if I don’t have to install Excel on the server.

However, most of the colours that they are using (which appear to be standard Excel colours), are returned by Cell.Style.BackgroundColor as Black.

Am I missing something, or is this a feature?



Hi Rob,

Please try Cell.Style.ForegroundColor.

Hi Laurence,

That worked, thanks!