キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Excel chart color problem using ActiveX (not RGT).

解決済み
解決策を見る

I am inserting Excel charts into an Excel sheet using ActiveX (not using RGT at all).

The subVI below shows how I format the Chart and Plot Areas. The colors produced on the Excel chart completely don't match what I choose. Yellow comes out as blue, and so on.

 

 

Excel Plots Incorrect Color.png

0 件の賞賛
メッセージ1/7
4,093件の閲覧回数

I think you are doing it backward.  Try this.

Capture.PNG

aputman
0 件の賞賛
メッセージ2/7
4,081件の閲覧回数
解決策
受理者 murchak

Actually it may just be the way colors are defined in Labview versus Excel.  If what I suggested above doesn't work, there is a VI called Convert OLE Color that may give you the right color.  Use Ctrl + Space to search for the VI. 

aputman
メッセージ3/7
4,073件の閲覧回数

Thank you! Covert OLE Color did the trick. I played around with your first suggestion with no luck. I am not entirely sure if I was doing it backwards. My original formatting subVI worked with some of the colors, but other colors didn't turn out right. I supposed if I did backwards, it would not work with any color. 

0 件の賞賛
メッセージ4/7
4,054件の閲覧回数

I wasn't really sure if it was backwards either.  I was thinking that the color object had to be defined first and then passed as input.  Does it work either way?  

aputman
0 件の賞賛
メッセージ5/7
4,002件の閲覧回数

LabVIEW color are 00 RR GG BB and Excel color are 00 BB GG RR so basically what the Convert OLE Color vi do is swap the RR and BB bytes. It could have been done like this also:

color swap.pngBen64

 

メッセージ6/7
3,996件の閲覧回数

Hi Ben, Aputman,

 

There was a forum post yesterday for people to post little nuggets of knowledge on anything they had learned or found useful. You are guys are LabVIEW experts and solving an issue like color mismatch between LabVIEW and Excel is trivial for you. But I bet if you post the solutions you offered here in that post, a lot of newbies like myself would find it quite useful. There are a lot of people who use LabVIEW to interact with MS Office. I can imagine this issue would pop up again and again. 

0 件の賞賛
メッセージ7/7
3,982件の閲覧回数