From: Maxx Chatsko on
Hello all,
I know that you can write colors to a cell(s) in an Excel Spreadsheet, but how can I read them?
Maxx
From: Andy on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i36pg1$clk$1(a)fred.mathworks.com>...
> Hello all,
> I know that you can write colors to a cell(s) in an Excel Spreadsheet, but how can I read them?
> Maxx

Do you mean you want to programmatically change or read the background color of specific cells? I believe you need to use actxserver to do this.
From: Maxx Chatsko on
"Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i36q09$foo$1(a)fred.mathworks.com>...
> "Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i36pg1$clk$1(a)fred.mathworks.com>...
> > Hello all,
> > I know that you can write colors to a cell(s) in an Excel Spreadsheet, but how can I read them?
> > Maxx
>
> Do you mean you want to programmatically change or read the background color of specific cells? I believe you need to use actxserver to do this.

That is correct. I can't find any great examples though...
From: Andy on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i36qsi$en2$1(a)fred.mathworks.com>...
> "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i36q09$foo$1(a)fred.mathworks.com>...
> > "Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i36pg1$clk$1(a)fred.mathworks.com>...
> > > Hello all,
> > > I know that you can write colors to a cell(s) in an Excel Spreadsheet, but how can I read them?
> > > Maxx
> >
> > Do you mean you want to programmatically change or read the background color of specific cells? I believe you need to use actxserver to do this.
>
> That is correct. I can't find any great examples though...

% sample

e = actxserver('excel.application');
eWs = e.Workbooks;
eW = eWs.Add;
eS = eW.ActiveSheet;
e.Visible = 1;
eR=eS.Range('A1:B10');
eR.Interior.ColorIndex=5;
eR.Border.ColorIndex=1; % to keep black border
From: Maxx Chatsko on
"Andy " <myfakeemailaddress(a)gmail.com>
> % sample
>
> e = actxserver('excel.application');
> eWs = e.Workbooks;
> eW = eWs.Add;
> eS = eW.ActiveSheet;
> e.Visible = 1;
> eR=eS.Range('A1:B10');
> eR.Interior.ColorIndex=5;
> eR.Border.ColorIndex=1; % to keep black border

Thank you kind sir =)