Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change a cell color
I have a c# program that builds a 2-d string array and copies it to a range
with a single statement similar to: oRange.set_Value( Type.Missing, myArray ); If my array looked like [0,0]="FOO1" [0,1]="BAR1" [1,0]="FOO2" [1,1]="BAR2", then in Excel I end up with A1=FOO1, B1=BAR1, A2=FOO2, B2=BAR2 Suppose I want some text in color or italics, is there any formula or function that I can embed in the text, e.g. "=ITALIC(FOO1)" that would give the desired formatting when the array is read into the spreadsheet? I need a solution that does not involve VBA, and everything that I have googled uses Excel conditional formatting or vba, which won't help me. Hope someone can help. Regds -- G.R.Stanbury |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change a cell color
You don't need VBA or conditional formatting to set either a cell's font or
background color. If your c# code can fill a cell with text it should also be able to: Format Cells... Font Italic -- Gary''s Student - gsnu200714 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change a cell color
Thanks for the reply. Yes, I know that I can do the equivalent on a
cell-by-cell basis, which is what I think I will end up doing. But as reading a large string array into a range with a single command is so fast, I would have preferred it if this array could also have contained the formatting, which would be dramatically faster than iterating through thousands of cells. Thanks anyway -- G.R.Stanbury "Gary''s Student" wrote: You don't need VBA or conditional formatting to set either a cell's font or background color. If your c# code can fill a cell with text it should also be able to: Format Cells... Font Italic -- Gary''s Student - gsnu200714 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change cell color but it doesn't change | Excel Worksheet Functions | |||
Excel: Syntax to change cell color based on color of another cell | Excel Worksheet Functions | |||
change cell color to red & then green when value change in 2 cel | Excel Discussion (Misc queries) | |||
change background row color with change of date in a cell | Excel Discussion (Misc queries) | |||
How to change the default Border, Font Color, and Cell Color | Excel Discussion (Misc queries) |