Spacy Posted January 28, 2005 Posted January 28, 2005 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 Quote
Mike_R Posted January 28, 2005 Posted January 28, 2005 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 Quote Posting Guidelines Avatar by Lebb
Recommended Posts