H homealone New member Joined Aug 14, 2006 Messages 1 Programming Experience Beginner Aug 14, 2006 #1 I can export data to ms_excel but i can't fill the cell's back color how to code to fill a cell's back color someone help thx
I can export data to ms_excel but i can't fill the cell's back color how to code to fill a cell's back color someone help thx
vis781 Well-known member Joined Aug 30, 2005 Messages 2,016 Location Cambridge, UK Programming Experience 5-10 Aug 21, 2006 #2 I'm assuming you are fairly familiar with automating excel? Here's how you would change the interior of a cell in Excel VB.NET: [COLOR=seagreen]Your Excel Object[/COLOR].Range([COLOR=seagreen]Start Cell Address[/COLOR],[COLOR=seagreen] End Cell[/COLOR] [COLOR=seagreen]Address[/COLOR]).Interior.ColorIndex = [COLOR=seagreen]YourColorIndex[/COLOR] Upvote 0 Downvote
I'm assuming you are fairly familiar with automating excel? Here's how you would change the interior of a cell in Excel VB.NET: [COLOR=seagreen]Your Excel Object[/COLOR].Range([COLOR=seagreen]Start Cell Address[/COLOR],[COLOR=seagreen] End Cell[/COLOR] [COLOR=seagreen]Address[/COLOR]).Interior.ColorIndex = [COLOR=seagreen]YourColorIndex[/COLOR]