Excel Set Color and Border VI: no fill?
If i use Excel Set Color and Border VI to modify the format of a cell, i will get white as my default color for my cell. However, I am looking for no fill. I don't want any color, since the color will hide the gird line. What do I get the no fill option for cell color in LabVIEW?
Kudos and Accepted as Solution are welcome!
Solved!
Go to Solution.
I have to say I was waiting for this question (I have tried it and observed the same thing). The only solution I see is to use a combination of the RGT vis and ActiveX.
Ben64
note, I have connected Cell1 and Cell2 of the _Worksheet Range method but it is probably sufficient to connect only Cell1 here.
edit: Good, your solution seems a lot more simple!
Similar Messages
-
NI_Excel.Ivclass:Excel Set Cell Color and Border.vi Error
Hi
I was trying to compile a file and I kept getting an error. It zeroed in on the vi that was not compiling. I am attaching the vi to this message. The vi seems to be broken. And I am not sure how to fix this. Can some one please help me out with this. Thanks in advance.
I guess it is associated with Report Generation Toolkit. Please let me know if you need any more details.
This is the error message 'One or more required inputs to this function are not wired or are wired incorrectly. Show the Context Help window to see what the connections to this function should be.'
Regards
Mr Miagi
Solved!
Go to Solution.
Attachments:
Excel Set Cell Color and Border.vi 20 KBhttp://forums.ni.com/t5/LabVIEW/Set-excel-cell-color-and-border-broken-can-t-build-application/m-p/1...
Please do a search. -
Report Generation broken after deployment - Excel Set Cell Color and Border.vi
Upon deployment, the Excel Set Cell Color and Border.vi became broken. After installing LV2010 SP1 to view the VIs in the deployment, I noticed that in the second case structure where the code draws the border using the BorderAround invoke node, there is an extra variant input parameter named 'Parameters'. Upon right-clicking, an option to 'Relink Invoke Node' appeared and after selecting this, the extra input disappeared and the VI was no longer broken.
Why does "Relink Invoke Node" appear? How do I create a deployment with this issue? Has anybody else experienced this? Why is the TestStand deployment so buggy?Hi Ching-Hwa,
I have set up a test deployment here where I am deploying a workspace that contains a sequence file. This sequence file has a LabVIEW Action Step calling a VI that opens a new Excel file and simply calls the Excel Set Cell Color and Border VI. After deploying this, both the VI and my test sequence ran on the deployment machine without error. Therefore, I do have some more questions to more accurately reproduce what you are seeing.
First, what operating systems are you developing on and deploying to? Also, what license do you have for TestStand on the machine you are deploying to? If you have a development version, can you manually take the sequence file and VI to this machine and run it? I know you now have LabVIEW 2010 SP1 on your development machine, but if you have the development version of TestStand as well, it would be interesting to see if you copy the files over if you still see this behavior. Are you including the TestStand Engine in the deployment?
Can you open a blank VI on the deployment machine and add the Excel Set Cell Color and Border VI? It would also be interesting to see if this is not a product of the deployment, but rather an issue with something on the deployment machine itself. What version of the Report Generation Toolkit do you have on each machine? Also, what versions of Excel are you using on the development and deployment machine? Again, it would be helpful for me to know exactly what versions you have installed on both the development and deployment machines so that I can reproduce this as accurately as possible.
One last thing to try, too, would be to try deploying the VI by itself just to see if it also has the same behavior. Do you have the Application Builder in LabVIEW? If so, could you also try building an executable from the VI, create an installer, and deploy this to the deployment machine?
In regards to the "freezing" of code by removing the block diagrams, I do not believe this will be a proper work around in this case. While this removes the block diagram from actually being deployed along with the VI and restricts users from editing the code on the deployment machine, if something is getting changed in the compiled code upon deployment, this will not stop this from happening. This option is available more as a memory option to lower the size of the deployment as well as prohibit any users on the development machine from editing the block diagram themselves.
Thanks, Ching-Hwa! I look forward to your response so that I can continue trying to reproduce this issue. Have a great day!
Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support -
Excel Set Cell Color and Border.viのbackground color 設定について
お世話になっております。
Microsoft オフィス用レポート生成ツールキットを使って
LabVIEWで収集したデータをExcelファイルで出力しようと考えています。
そこで質問が有ります。
題名のようにExcel Set Cell Color and Border.viのbackground color 設定についてです。
デフォルト(未配線)では白に設定されていますが、”色なし”に設定するにはどうしたら良いのでしょうか?
又、罫線色等を指定する数値設定に関しては、何処を調べたら良いのでしょうか?
ご教授の程、宜しくお願い致します。_YN 様
平素よりNI製品をご利用頂きまして誠にありがとうございます。
日本ナショナルインスツルメンツ技術部の湧川と申します。
ご質問にお答え致します。
色なしにしたいとの事ですが、こちらでExcel Set Cell Color and Border.viを使用して簡単なVIを実行させてみましたが色なしに設定することはできませんでした。
そこで質問したいのですが色なしにする理由というのはバックグラウンドが白のままだとセルの枠が見えなくなるからでしょうか。
もしそうであれば設定により枠をつけることができますのでそちらの方を試して頂けたらと思います。
方法としましては同じExcel Set Cell Color and Border.viを使い設定します。
アイコンの上部にピンク色のピンが2つあるかと思いますがそちらからセル内側の線、外側の線を設定できます。
添付した画像を参照して下さい。
画像のように設定しますとセルに黒色の枠ができると思います。
数値設定などに関しても質問されていますが、そちらはヘルプがありますのでそちらを参照頂けると詳しい情報がわかるかと思います。
LabVIEWでVIを開いている時に ctrl + H を押しますと小さいウィンドウ「詳細ヘルプ」が立ち上がります、その状態でマウスのポインタをアイコンに重ねて頂きますと詳細ヘルプにアイコンの説明が記述されます。
ウィンドウズ内のリンクからオンラインヘルプを参照することもできます。
上記内容をご確認いただきまして、何かS_YN様の意図と違う点などありましたらご連絡下さい。
宜しくお願い致します。
日本ナショナルインスツルメンツ株式会社
技術部
湧川 朝満
添付:
Excle Set Color Sample.JPG 58 KB -
Excel Set Cell Color and Border VI
您好,
請問如果不小心更改到Excel Set Cell Color and Border VI的內容,應如何復原?
謝謝!!!
已解決!
轉到解決方案。
附件:
Excel Set Cell Color and Border.jpg 231 KBhttp://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/zht/pg/1/sn/catnav:du/q/report%20genera...
以下載點除了 labview 2012 report generation toolkit 以外
其他都是 patch 檔
如果您有購買正式版,也許您可以跟 NI 客服部求救 -
I need a way to set the properties of a text box--color and
font of the text inside it--upon an event, wether it's in the
timeline or off a button release or even LoadMovie would work. Is
this possible?
woodburyHi Firstodd,
1. Try re-assigning the text after you set the format:
blackjack.onPress = function() {
var oldText=this._parent.field.text;
var myFormat = new TextFormat();
myFormat.font = "BlackJack";
this._parent.field.setTextFormat(myFormat);
this._parent.field.text=oldText;
I haven't played around with the AS3.0 enough yet but I know
that the
2.0 one applies changes to new text so you need to add "new"
text to the
field by recopying the existing text. Basically...rewrite the
text with
the new format.
2. Your formats are stored in the text field's format
property. You can
either keep a reference to the original format you created
('myFormat'
above), or use:
var myFormat=this._parent.field.getTextFormat();
The text format has a variety of properties you can read such
as font,
size, color, and so on. Have a look at the TextFormat class
reference in
the Flash help. Most of these are completely optional so you
can
set/read whatever you want.
About the text, you simply read or write to the field's text
property
like we did in example 1:
this._parent.field.text="This is new text";
var fieldText=this._parent.field.text;
If you want the user to be able to input text into the field,
make it an
input field:
this._parent.field.type='input';
Otherwise, it's just dynamic:
this._parent.field.type='dynamic';
Do you want it selectable?
this._parent.field.selectable=true;
If it's tall enough to support multiple lines, do you want
multiline
support?
this._parent.field.multiline=true;
Automatic line wrapping on lines?
this._parent.field.wordWrap=true;
You can get even lower-level if you want. You can monitor
what the user
types character by character (assuming this is AS2.0):
function onFieldChanged(fieldRef:TextField) {
trace ('Field now has text: '+fieldRef.text);
this._parent.field.onChanged=this.onFieldChanged;
A field can also cut off if you exceed the available area.
You can set
auto-sizing so that the field adjusts itself to what you
type:
this._parent.field.autoSize='left';
//Use 'center' to keep the text aligned to the center of the
field, and
'right' for right alignment.
Dimensions of the typed text, in pixels, can be obtained
through:
this._parent.field.textWidth;
and
this._parent.field.textHeight;
(You can get the dimensions of the field using _width and
_height but
this is the field size, including borders).
Speaking of borders:
this._parent.field.border=true;
And background...
this._parent.field.backgroundColor=0x00FF00; //green
backrgound
this._parent.field.background=true; //turn it on
I could go on for pages...have a look at the TextField class
to see
everything else you can grab.
The TextField class is the actual field...TextFormat is the
optional
format that's applied to the text.
Hope that helps,
patrick
Firstodd wrote:
> Actually, I did this to embed the fonts I wanted (they
are all non-standard):
>
> The buttons to pick the fonts are broken down, so
graphic and not text. Off
> the the side, out of the canvas, I made a text box for
each font I wanted, and
> put a letter in each, anything would work. I applied the
font to each of these
> letters/text boxes, and then on the properties, I
clicked the "Embed..."
> button, and ctrl-selected "uppercase" "lowercase"
"numerals" & "punctuation",
> for each font on each text box.
>
> Works great, the dynamic text that lets the user types
in changes fonts and
> colors correctly using the script you gave me, even on
computers that don't
> have those ornamental fonts installed.
>
> --
>
> However, I do have a couple questions that any advice
would be appreciated...
>
> 1. When the playing the .swf (which is just 1 frame
stopped), the buttons that
> change the font and color of the named dynamic box--they
have to be pressed
> twice the first time to apply it to the text. But after
it's been applied, and
> you change it, one click will do to get it back to that
color again. I can't
> figure out what would be causing this. My scripts are
all clones of this:
>
on (release) {
> blackjack.onPress = function() {
> var myFormat = new TextFormat();
> myFormat.font = "BlackJack";
> this._parent.field.setTextFormat(myFormat);
> };
> }
>
> changed accordingly for the color buttons.
>
> 2. My next step on this is to, upon the push of a
button, extract the
> information of the instanced text box. As you can see, I
named it "field". I
> don't know where to start with the script for these
kinds of things.
> Properties... I mean what the user has typed, it's
color, and it's font.
> Actually, this needs to go to some sort of check out
system, which I'm not
> familiar with at all, so I'm not expecting a walk
through setting it up, just
> some direction if you could =).
>
> Thanks again
>
> Woodbury
>
http://www.baynewmedia.com
Faster, easier, better...ActionScript development taken to
new heights.
Download the BNMAPI today. You'll wonder how you ever did
without it!
Available for ActionScript 2.0/3.0. -
Excel cells colors by labiew 2009
Hi,
I have an application. Where in i have to change the colors of Cells in Excel as per the result after doing some manipulations on my data. Exampe
: if true then color to green and if False then color to Red.
I use Labview2009, Microsoft office 2007. and i am little confused, whether there is any module report generation toolkit for ms office, to use with Labview 2009.
Thanks in advanceOfcourse you have. In Report generation toolkit you have a vi called Excel Set Color and Border.vi with this you can set the color of the cell.
The best solution is the one you find it by yourself -
JEditorPane set color for desired chars
How can I set color and other parameters for desired chars in JEditorPane or it's better to use some other class.
Thanks.Read this section from the Swing tutorial on "Using Text Components" and then decide which is best for you:
http://java.sun.com/docs/books/tutorial/uiswing/components/text.html -
On value selected in dropdown, set border and border color to subform
Ok, I'm busy creating a form which has a dropdown field. There are five values inside the dropdown. I also have four subforms which contain tables and fields for each option in the dropdown except the first one. Now I want to set the border and border colour of the subform when the right value is chosen.
In the exit part I created the code as follows:
if (this.rawValue == "5"){
this.resolveNode("TextfieldName").presence = "visible"; //This sets a text to visible...works like a charm
Optie1.ui.oneOfChild.border.color.value = "255,153,0"; //After an example I found from Niall
Optie1.ui.oneOfChild.border.color.thickness = "0.0200in";
I changed this into Optie1, that's the name of the subForm. Somehow it doesn't apply it on the subform. I know I'm doing something wrong, but can't quite find what I want on the forums. Anyone any idea on this?Okay, managed to solve this myself by playing around a bit with the code.
It should be:
Optie1.border.edge.color.value and Optie1.border.edge.thickness. -
Is there a way to change the color of the Bezier Curves and points to a different color other than black I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent backgrounds. Any thoughts?
Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion. -
Color Swatches in Toolbar for Fill and Stroke are not working properly.
The color swatches in toolbar for fill and stroke are not functioning as they should. When I select an object on the artboard, the swatches display fine in the toolbar for what they should be. However, when I double-click on those swatches from within the toolbar to modify the color, the color which comes up is #000000 instead of the actual color it should be.
I am using 16.2.1 (cloud) for Mac OS 10.8.2
I've submitted a bug report, but want to know if anyone else has had this issue and what they did to resolve the issue.
Also, the eyedropper tool is buggy and occasionally places the #000000 into an object instead of the characteristics the eyedropper is selecting. I don't have any hidden layers or weird groupings, it just randomly decides when it is going to work or not.
I've never had these issues on previous versions of illustrator and have been proficient in all versions since 2007.Double click the eyedropper, and turn on appearance, is off by default.
For your #000000 color problem that also likely is related to appearance setting. You may have for example have some with #000000 at the character level, and another color at the type level. -
How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?
Thank you!Hi;
That is not a workflow that is supported by the Adobe forms solutions at this time.
Thanks,
Josh -
Setting font and color TextItems
This script is failing to set font, and how can I set font color?; I am new to PS Scripting:
var originalUnit = preferences.rulerUnits
preferences.rulerUnits = Units.INCHES
var docRef = app.documents.add( 11, 17, 300, "Test", NewDocumentMode.CMYK)
MyLayer = docRef.artLayers.add()
MyLayer.kind = LayerKind.TEXT
var myFont = app.fonts.getByName("ArialMT");
// Set the contents of the text layer.
var textItemRef = MyLayer.textItem
textItemRef.font = myFont;
textItemRef.size = UnitValue(36, 'pt');
textItemRef.font = '_Aviano-Regular';
textItemRef.style = "Italic";
textItemRef.contents = "Sample Text";
// Restore original ruler unit setting
app.preferences.rulerUnits = originalUnit
ThanksThe font needs to be the postscript name, this will give you a list of them.
var Dlog =
"dialog{text:'Script Interface',bounds:[100,100,500,270],"+
"FontName:DropDownList{bounds:[30,40,370,60]},"+
"PostScriptName:DropDownList{bounds:[30,100,370,120]},"+
"statictext0:StaticText{bounds:[40,10,200,30] , text:'Font Name'},"+
"statictext1:StaticText{bounds:[40,70,141,87] , text:'Postscript Name'},"+
"button0:Button{bounds:[140,130,240,150] , text:'Ok' }}";
win = new Window(Dlog,"Use the Postscript Name in your script.");
var item;
var item2;
for (var i=0,len=app.fonts.length;i<len;i++) {
item = win.FontName.add ('item', "" + app.fonts[i].name);
item2 = win.PostScriptName.add ('item', "" + app.fonts[i].postScriptName);
win.FontName.selection = win.FontName.items[0] ;
win.PostScriptName.selection = win.PostScriptName.items[0] ;
win.FontName.onChange = function() {
win.PostScriptName.selection = win.PostScriptName.items[parseInt(this.selection)] ;
$.writeln(win.PostScriptName.items[parseInt(this.selection)]);
win.PostScriptName.onChange = function() {
win.FontName.selection = win.FontName.items[parseInt(this.selection)] ;
win.center();
win.show();
Here is your code with colour addded...
var originalUnit = preferences.rulerUnits
preferences.rulerUnits = Units.INCHES
var FillColor = new SolidColor;
FillColor.rgb.hexValue = 'ff0000';
var docRef = app.documents.add( 11, 17, 300, "Test", NewDocumentMode.CMYK)
MyLayer = docRef.artLayers.add()
MyLayer.kind = LayerKind.TEXT
var myFont = "ArialMT";
// Set the contents of the text layer.
var textItemRef = MyLayer.textItem
textItemRef.font = myFont;
textItemRef.size = UnitValue(36, 'pt');
textItemRef.font = myFont;
//textItemRef.style = "Italic";
textItemRef.fauxItalic = true;
textItemRef.contents = "Sample Text";
textItemRef.color = FillColor;
// Restore original ruler unit setting
app.preferences.rulerUnits = originalUnit -
Guide to set the cell background color and foreground color
hi all,
I am using a tool called POI for excel from java. IF any body know POI please tell me the various colors --------> equivalent Short number. I need the color and equavlent number for better usage.
please respond as early as possible.Hi
Use the class HSSFColor at org.apache.poi.hssf.util and the inner classes defined, for example (sample form jakarta.poi):
style.setFillForegroundColor(HSSFColor.ORANGE.index);
or for a cell
cell.setFillForegroundColor(HSSFColor.ORANGE.index);
If you need know what index for a color may be at source code you can see the implementation.
Hope this helps -
Scanned pdf image into Illustrator (Live Tracing,filling colors and styles)
Hi,
I am a newbie in the forum.My first ever post. I have specific issue which needs your opinion. I have scanned a black and white sketch image which I bring on to Illustrator. The problem start after live tracing.
After live tracing I need to fill it with a certain color (which I find absent in swatches).
I have to update these sketches into an Indesign brochure which already has the original imported Illustrator sketches (done by some one else). So the original imported Illustrator sketch files have a color filled in and particular chalk like impression (style).
So the problem is that I do not know how to fill the live traced sketch outlines with a color and then bring in a chalk like style to it.
I need assistance badly..I have hit a bad road block.
Thank you.I have never used the live paint feature, sorry.
I typically always create everything with the pen tool, and some basic shapes, I draw a shape and then fill it with a color, gradient, or a stroke. This can see limiting at first not using a lot of filters but in the long run the precision control is worth it. I design entire websites this way, for example these are two sites I am currently working on….
http://www.storagefront.com
http://www.lenderstreet.com
Lots and lots of fun illustrator work.
Maybe you are looking for
-
I would like new tabs to open at the beginning of the tab line - not near the end.
-
When & why to create a "master layer" in CS6 for multi-layer image?
I would appreciate a link or a brief explanation of"when & why" and "how to use" a master layer when working with a multi-layered image (psd or psb) file in CS6. I've done a google search and haven't found anything useful. I've seen a couple of tutor
-
JApplet - maintaining state?
Dear users, I'm am developing a JApplet with two JPanels on it. One of the panels has buttons and a textarea on it, and the other one is where i do some painting. It works wonderfully on my local machine. However, i have some problems when deploying
-
Is it possible to connect a video camera for skype on the first version of ipad?
I am trying to use Skype with a newer version of the iPad to the first version of the iPad which apparently does not have a camera. Is there any way to connect a camera to it so this can be done? Thanks!
-
Can't view iPhoto's on PC's exported to web, Macs fine...
I exported photo's from iPhoto and put them on a web site. Mac users can see all photos but PC's can open the pages but can not view the photos. PC's are using XP Pro. Thanks! Keith G4 Powerbook 1.25 Mac OS X (10.4.7)