FormatConditions for Excel in CVI

Hey everone!

I am writing a program in CVI which reads data from ASCII files and after a few calculations print an Excel worksheet. I do this with Excel report instrument and it works so far.

Now, I want the cells to be formatted, according to other cell values. Let's say I have cells with the following values in the worksheet:

Max: 5

min: 3

value: 2

The State of the cell, containing the 2 should be: if (larger than max, or smaller than min)-> red, or green

I found a function in the Library Microsoft Excel 9.0, named Excel_FormatConditionsAdd, but I don't know how to use it.

The Panel is fixed.

And there seems to be no help file.

Could someone give me a hint on how to use this function? I'd also appreciate links to useful resources...

Hope there's someone out there...

see you soon

Wohoo...

I finally found the solution, I really had to do the opposite:

//first get the FormatConditions property of the desired range
Excel_GetProperty (ExcelRangeHandle, NULL, Excel_RangeFormatConditions,CAVT_OBJHANDLE, &ExcelFMs);

//THEN add the conditions
Excel_FormatConditionsAdd (ExcelFMs, NULL, ExcelConst_xlCellValue, CA_VariantInt(ExcelConst_xlGreater), MyVariant, CA_DEFAULT_VAL, &ExcelFM);

//Now get the FormatConditionInterior property of the FormatCondition
Excel_GetProperty(ExcelFM,NULL,Excel_FormatConditionInterior,CAVT_OBJHANDLE,&interiorHandle);
//and finally set the InteriorColorIndex property of this thing to some number (3 is red)
Excel_SetProperty(interiorHandle,NULL,Excel_InteriorColorIndex,CAVT_LONG,3);

After this terrible pain in the ass I really deserve a beer now.

Thank you again once, first I thought that this thing would never work.

Tags: NI Software

Similar Questions

  • LabVIEW GOOP for Excel

    Hello world

    I'm new with Labview and I would like to copy and paste data from a .txt file to an Excel sheet.

    Do you know if there is a link somewhere on the internet to download a version of the 'GOOP' for Excel tool that works at least with Labview 2014?

    This one is too old... http://www.NI.com/example/27974/en/

    Or perhaps is already someone doing a VI that do (or almost) I want?

    I would like to read a structured-for example .txt file like this:

    Date of test XXXXXX
    Test of stadium XXXXX
    Repeat XX

    Voltage 1 [V] XXXXX
    Voltage 2 [V] XXXX
    Temp 1 [° C] XXXX
    Temp 2 XXX [° C]
    Result XXXX

    Num 1 X
    Num 2 X
    NUM 3 X

    Name of the script XXXXX
    XXXXX script version

    And for copy and paste line-by-line results (XXX) in the different cells of the first empty line of a specific Excel spreadsheet

    Make a table with all the titles and values screenshots

    Save the image to a specific folder

    Save the Excel sheet...

    Thank you for your time and consideration

    See you soon

    Hi Neercs,

    you know that this is for 2014 LabVIEW.

    I found a LabVIEW VI to run an Ecxel Makro as well.

    Hope I could answer your questions.

    Kind regards.

  • HPC for Excel - get the exception when running the diagnostics

    I was wondering if anyone would be able to provide assistance with the issue I am dealing with the help of HPC (2012 R2) for Excel (2016).

    I started a new Setup and all made in the paper, as shown here on the Microsoft Web site: start with HPC server (this site is not allow me to paste the link here). I have a test cluster consisting of 1 head node, 1 compute node. The domain controller is on a separate server. All have Windows Server 2012 R2 64-bit installed and installed using the deployment of Excel 2016 32-bit Office tool. I have installed HPC Pack 2012 R2 Update 3 on the head node and compute node. The problem is when I run the Test of the Excel of Diagnostics of HPC Cluster Manager Configuration, the test fails for the two nodes (i.e. the head and calculation). For the head node, I get an exception with a long error message that ends with some problem with "ExcelClient.Dispose". On the compute node, the error is that she could not invoke service 'Excel '.

    I think I have done everything exactly according to the instructions and followed other steps that have helped me in a successful test deployment. Any help to understand what I am doing wrong will be greatly appreciated!

    Hello

    I suggest you post your query on the TechNet forums to get help. Consult the following link:

    https://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?Forum=winserver8gen

    It will be useful.

  • Automatic update failed for Excel 2003 (KB959995)

    After the initial update indicates a significant update was not tried again. She's not too, and I got code error 80070643. Who directed me to go to Services and check the engine for Service Bureau, set it for auto - delayed start and start it. However, I found that it was running OK, but did change the automatic setting - delay and left it running. Then, I rebooted the PC in the case where the other updates is in conflict with this one.

    I then tried to reinstall the update from Windows Update, and again once it failed with the same error code. I checked again the services and the OSA works well. Help!

    Under Vista Home Premium and Office 2003 w/SP3 on an AMD Athlon 64 3500 2.21 GHz and 4 GB of ram

    Hi Bergie532,

    See:
    http://support.Microsoft.com/kb/959995
    "MS09-009: Description of the update of security for Excel 2003: 14 April 2009.

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    Hope this helps, Vincenzo Di Russo - Microsoft MVP Windows Internet Explorer, Windows Desktop experience & Security - since 2003. ~ My Blog: http://blogs.dotnethell.it/vincent/

  • Long-term file types (i.e., 'Microsoft Visio Drawing') vs short ("XLS" for Excel files) displayed in a detailed view of the folder

    In my point of view of folder, file types include long-term (i.e., "Microsoft Visio Drawing" and some are abbreviated ("for Excel files XLS).) Before this machine, all my types of files have been long-form... How can I get the form long back for all of my files?

    Have you tried to create a macro - see this

    http://www.MrExcel.com/Forum/showthread.php?t=525026

    If you save stencil files and model that are designed to work together, to ensure that their design page, styles, and colors settings are compatible. For more details, see http://msdn.microsoft.com/en-us/library/aa200991(v=office.10).aspxChapter 10, Managing Styles, sizes, and Colors.

  • Need access to the Q: drive that contains the Microsoft Starter 2010 for EXCEL, Word files, etc.

    Cannot access the Q: drive which has the 2010files MS Starter for EXCEL, Word, etc. Attempted to change the property. Access denied. Signed as an administrator and the only user of the computer.

    Anyone?

    You can not, as says Gordon is a virtual drive, the end user does not have access to it.

    And no sound does not contain the files Office Starter

    Try here http://office.microsoft.com/en-us/starter-help/update-repair-or-uninstall-office-click-to-run-products-HA010382089.aspx

  • Is it possible to export a SR for excel or csv?

    Is it possible to export a SR for excel or csv?

    Hi User537081,
    Welcome to the community!

    NOTE 1496117.1     I miss the tab reports - how create/make/access reports in My Oracle Support explains some options considered, including excel export.
    Please take a look at this document.

    Thank you
    Jörg

  • Looking for best software Acrobat Writer/Conversion for Excel 2003.   I have Standard but you want to update.  Anyone have any ideas?

    Looking for best software Acrobat Writer/Conversion for Excel 2003.   I have Standard but you want to update.  Anyone have any ideas?

    Hi Dennis,

    Acrobat CC is not compatible with MS Office 2003 and currently, we only sell Acrobat DC. However, if you opt for a subscription of Acrobat DC you can install and use Acrobat XI that is compatible with Office 2003, but only to a certain update.

    Please check details of compatibility here: web browsers and applications of PDFMaker

    Thank you

    Abhishek

  • Add-in for excel models

    Hi all
    I'm new to BI Publisher. Can someone tell me what I need to create templates in Excel? Maybe some plugins? I worked with the XML Editor, where the necessary thing for the creation of model using Word was Oracle XML Publisher Desktop.

    Version BI: 11.1.5

    Thanks in advance,
    Alexander.

    Oracle XML Publisher Desktop 11.1.5
    also work for Excel

  • OBIEE 11 G equivalent to MS Publisher Desktop for Excel

    Hello
    I have a question. In Oracle Business Intelligence 11g has been developed a similar to MS Word add-in (generator model), but for Excel add-in? In other words, can I create templates and import since BIEE data also in Excel?

    Thank you

    Hello

    I don't think that there is anything similare to MS office template generator.
    The only way you can import items from catalog OBIEE is by using the add-in to office BI shown here:
    http://www.Oracle.com/WebFolder/technetwork/tutorials/OBE/FMW/bi/BIEE/r1013/bi_addin/bi_office.htm#t2s1

    Concerning
    Adil

    Please give points and close the thread when your question is answered

  • Out of the queue of SQL * Plus for Excel

    I'm out of the queue of SQL * Plus for Excel. The code I use is down. I want that all white space to carve when I open the updated file waiting in Excel. How can I ensure this?

    I was reading on the SET TRIM command, but it says that it does not affect the output queued. (http://ss64.com/ora/syntax-sqlplus-set.html)

    Is there a way to NOT display whitespace at the beginning and the end of a column in SQL * more? In other words, if I shoot a single column of a record, and a data element is only 3 characters in length, I want to be also 3 characters instead of extending over 40 characters across the width of the column.


    The column for your troubleshooting information
    IDNUMBER is NUMBER (12)
    FIRST is VARCHAR2 (40)
    The LAST is VARCHAR2 (60)


    Code
    SET LINESIZE 100
    SET PAGESIZE 0
    SET MARKUP HTML PREFORMAT ON
    set colsep,
    coil c:\prospects.csv
    Select '' perspective ID"', '" First"',""finally" "from dual;
    Select to_char (p.idnumber), p.first, prospect_view p.last p where idnumber = 164515;
    spool off

    DataHandle wrote:
    I'm out of the queue of SQL * Plus for Excel. The code I use is down. I want that all white space to carve when I open the updated file waiting in Excel. How can I ensure this?

    I was reading on the SET TRIM command, but it says that it does not affect the output queued. (http://ss64.com/ora/syntax-sqlplus-set.html)

    TRIM affects the expressions in your SELECT clause. It has nothing to do with the padding of SQL * Plus adds to align the columns upwards.

    Is there a way to NOT display whitespace at the beginning and the end of a column in SQL * more? In other words, if I shoot a single column of a record, and a data element is only 3 characters in length, I want to be also 3 characters instead of extending over 40 characters across the width of the column.

    Here's a way to make the main request:

    SELECT        TO_CHAR (idnumber)
    || ',' ||  first
    || ',' ||  last
    FROM           prospect_view
    WHERE        idnumber     = 164515
    ;
    

    This will include spaces only if they occur in first or last. Depending on your data and your requriements, you may need to use the FILLING (first) instead of the first, and/or TRIM (finally) instead of the last.

    Using this technique, it does not matter what is COLSEP: the query produces a single column.

    Use the SQL * more order

    SET  TRIMSPOOL ON
    

    to keep SQL * more add space after this single column.

  • Where can I download version 9.3.1 Essbase for Excel addin - 2003?

    H,

    Where can I download version 9.3.1 Essbase for Excel addin - 2003?


    Please notify

    Try going to http://edelivery.oracle.com/
    Performance management Hyperion and BI (9.3.1) Media Pack for Microsoft Windows (32-bit)
    Essbase client installation program will be available for download here.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Cannot create excel object for Excel 2007/Windows 7

    Hello everyone,
    The code below works fine for Excel 2003 / Windows XP/IE6 but does not work for Excel 2007/Windows 7/IE8.

    *********************
    application: = Client_OLE2. CREATE_OBJ ('Excel.Application');

    Client_OLE2. SET_PROPERTY (application, 'Visible', 'TRUE');

    workbooks: = Client_OLE2. Get_Obj_Property (application "Filing cabinets");

    args1: = Client_OLE2.create_arglist;
    ************************

    There is no error when running the form, debug, we found that the control ignores all of the code above.

    I use Oracle forms 10.1.2.3 and jre 1.6.0_16.

    Would appreciate your help in providing a solution for the above question.

    Thank you
    Anbu

    I recommend you try the following in the order I listed the.

    1 disable UAC. See here: http://windows.microsoft.com/en-US/windows-vista/Turn-User-Account-Control-on-or-off

    2. Add a SYNCHRONIZATION; After your first line of code (that you provided in the post - I guess that's all that)

    application := Client_OLE2.CREATE_OBJ('Excel.Application');
    SYNCHRONIZE;
    

    3 uninstall JRE 1.6.0_16 and reconfigure for use with the last one which is 1.6.0_21

    4. install the patch 9282569forms. This hotfix requires that you upgrade to Jacob to version 1.10.1. It will also take that you generate a new webutil.plx (new webutil.pll is included in the patch). Read the patch readme carefully before installing.

    Note that more recent versions of MS Office like '2007' have not been tested with 10.1.2 and webutil Forms, so it may not work properly if MS made changes to the structure of COM in their products.

  • How is for NI LabWindows/CVI? How is it likely to be in the future?

    Hello

    How is changing in favour of NI LabWindows/CVI?  If it's good now, expect the same level to continue in the future?

    Thank you

    Gayle

    Hi Gayle,

    To answer your question re using LabVIEW OO with CVI, they are quite different technologies and really cannot be used in conjunction with each other. That said, if you put the code of the BCI in a DLL, you can call in the LabVIEW DLL using a node call library feature. If this is not clear things up for you, please let us know a little more on what you ask.

    As an observation, I am happy to learn that many of you have had good experiences with our support! Certainly, we do our best to provide excellent support and strive to help you succeed with your applications.

    Best regards

    John M

  • Question formula for Excel to numbers

    I have a Sumproduct formula to an Excel spreadsheet, but I need to make a version of numbers that does not allow this formula.  I'd appreciate any help!

    What I'm trying to make (which works perfectly in Excel with this formula) is to count a line if it meets the following criteria:

    (1) date in column B is in the current year (not preprogrammed for 2016 or a given year)

    (2) the date in column B is in a given month (the below formula returns the number for the month of February '= 2')

    (3) description in column C says "Retail".

    = SUMPRODUCT ((1 * (Year(conversions!$B$3:$B$9976)=Year(Now())) * (MOIS (Conversions! $ B$ 3: $B$9976) = 2) *(Conversions!$C$3:$C$9976="Retail"))))))))

    As you have discovered, numbers does not support the form of 'matrix formula' of SUMPRODUCT.

    You can, however, use COUNTIF to accomplish similar things.

    = SUMIFS(<column>,<condition>,<column>,<condition>...<column>,<condition>)

    The formula in B2 of table 2:

    = COUNTIF (table 1: $B, ">" & EOMONTH(A1,0) will GET (DATE (YEAR (NOW (), B1, 1), −1), table 1: $B, "<" & EOMONTH(A1,0) will GET (DATE (YEAR (NOW (), B1, 1), 0) + 1, table 1: $C, "Retail")

    Lines 4 and 5 are simply to illustrate the dates built by the party 'conditions' of the formula. One is the end of the month preceding the month chosen, we're at the beginning of the month following the month selected.

    So the formula is indicative of numbers to count the dates in column B after the end of the previous month this year and before the start of the month next in the current year, where the value of column C is "Retail".

Maybe you are looking for

  • How to run a bootcamp for a USB?

    I have a Bootcamp existing Windows operating system on an external drive in the solid state I cloned my old MacBook Pro. Is it possible to boot this operating system of the drive? I tried to connect via my USB connection and now Option during the boo

  • Pavilion 13 x 360 convertible: convertible laptop CMOS battery HP 13 x 360

    We are working on 13 a friend x 360 laptop which has battery issues. We replaced the battery and still having problems with time remain up-to-date and slow start so assume it's the CMOS/RTC battery. The problem is, we can't find! We have removed the

  • Example: Deskjet 3050 - J610: printer removes items in the print queue

    Please see problem posted on June 9, 2016 and thread support. Sorry, I don't know how to go on this subject but the problem that I've marked as being solved is no longer is. It it is possible to mark as resolved and to reopen the thread please let me

  • nonsense I can't play Disney games because of this stupid bug

    When I try to play infinite disney 1 so half the screen turns black and the game drops to the bottom half so, how do you that I play my games? Quickly correct missing im on a lot of fun Moved from the community involvement Center Disney has added to

  • Process "parallel."

    I don't think I've ever had it answered... I run a functional test (LV2014... Win 7.DAQ6229) in the functional test.vi is a structure flat seq.  In each seq is a Subvi... subvi1 can subvi2 etc.  Each of these subvis I use the DAQ to measure DIO/volta