Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Re: Reading Colors from Excel

 

Hi,

 

I would like to know how you achieved reading from excel.

I know that the data can be read by using excel as datasource.

But, apart from reading data, i also want to read the

foreground and background colors of the cells.

Please help me.

 

 

Regards,

Spacy.

 

 

Hello,

 

Is there a possible way to get the back and foreground color form an excel cell ?

 

For instance:

The backcolor of the cell is made red

The forecolor of the cell is made blue

 

Is there a way to get these values into variables for one cell ? I allready managed to read data from an excelsheet. But now I also want to try to get other attributes.

 

Who can help me ?

 

Regards,

Antoine

Posted

Spacy,

 

To do this you would have to open up Excel programmatically, you can't do this remotely as you would say using ADO to read the data. Once opened, you could read the Range.Interior.ColorIndex and the Range.Font.ColorIndex.

 

For a backgrounder on Automating/Controlling Excel, you could read here: Automating Office Programs with VB.Net / COM Interop.

 

Let us know if we can help further...

 

-- Mike

Posting Guidelines

 

Avatar by Lebb

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...