CVI 2009 vs. 2010: compatibil​ity to Excel

Hello all,
I have created an application in CVI2009SP1 that exports its data to an Excel file using Excel2000 instrument driver shipped with CVI. All works well if the application is compiled and run on a WinXP machine but when run on a Win7 machine the customer complains to receive a strange error while opening the generated files:
The message basically means "The format of the file you want to open does not correspond to the type declared in its extension"
Pressing Ok will open the file regularly but I wonder what this error means and how to put it away.
I tested this situation in Excel 2007 and 2010, both starter and full edition: despite the error the files open regularly. On the other hand, the generated file cannot be opened in Word2000 due to a more severe "format not recognized" error.
I tried compiling the executable in CVI 2010 and I receive no error even if the Excel instrument is still declared as "Microsoft Excel 9.0 object library" the same as it is in 2009; nevertheless the object file associated to the instrument is newer than the 2009 version (June 30, 2010 for the library shipped with CVI2009; June 22, 2011 for the 2010 one).
I would prefer not to distribute a release compiled in 2010 as the application drives a high power equipment for research on prototypes and I cannot test it in real environment, so I tried simply to substitute CVI2009 version of the Excel interface library with the CVI2010 one and the program compiles and executes without errors.
So questions are:
Q1. Any clue as to what that error means?
Q2. Is it safe to upgrade the Excel library in CVI2009?
Q3. Any possibility to maintain compatibility to older versions of Excel?
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Hi,
I diffed the source codes and they are effectively identical, while the libraries are slightly different in size (some 10 bytes) and creation date. I don't know if checking the object for differences makes sense. I haven't modified that instrument in any way.
I'll try to send to the customer a program release compiled in CVI2009 with 2010 library and see what happens: unfortunately I don't have in my office the exact copy of the target machine (Win7Pro + Office2010) to check it on.
To write the file I use the following:
errChk (CA_VariantSetCString(&MyVariant, <file pathname>));
errChk (Excel_WorkbookSaveAs (ExcelWorkbookHandle, NULL, MyVariant,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, ExcelConst_xlNoChange,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL));
While examining my code now I noted something I didn't remember: when moving data to Excel I try to get the decimal point formatting code used in the system and apply it to the data in Excel worksheet, using this code:
// Read decimal separator from the registry
strcpy (msg, "Control Panel");
MakePathname (msg, "International", msg);
RegReadString (REGKEY_HKCU, msg, "sDecimal", a, 512, &i);
// Select some columns to format
sprintf (msg, "D2:H%d", cnt + 1);
errChk (CA_VariantSetCString (&MyVariant, msg));
if (ExcelRangeHandle) errChk (ClearObjHandle (&ExcelRangeHandle));
errChk (Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyVariant, CA_DEFAULT_VAL, &ExcelRangeHandle));
errChk (Excel_RangeActivate (ExcelRangeHandle, &ErrorInfo, NULL));
// Apply the proper format
sprintf (msg, "#0%s0", a);
errChk (CA_VariantSetCString (&MyVariant, msg));
errChk (Excel_SetProperty (ExcelRangeHandle, &ErrorInfo, Excel_RangeNumberFormat, CAVT_VARIANT, MyVariant));
I wonder if this code can cause any problem when executed on a Win7 machine?
Coming to your last question, I am using excel2000 instrument driver with the code above. Situation is as follows:
- When execute on a WinXPPro machine with Excel2000 I can create files without problems. Files created can be viewed in Excel2007 full and Excel 2010 starter without errors nor warnings
- Files created by the application running in a Win7 box can be opened in Excel 2010 with the warning I posted. They can't be opened in Excel2000: I receive the error "This file is not in a recognizable format" and if I follow on I see binary code in the worksheet
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • ^How to show difference between sales in year 2009 and 2010

    Hi experts,
    I am facing a problem in a BEx Query. I have to show the difference between the sales of two years. Let me be more specific..
    I only have one keyfigure sales and only one characteristic year and I need the column difference.
    year      sales      difference
    2009      5000      -
    2010      8000      3000
    2011      9000      1000
    Please can anybody explain me how to get this.
    Many thanks in advance
    Peter

    Hi Peter
    There are various ways of getting the result you are going for.
    1. If you are 100% locked to the way the data has to be shown - you can use CELLS.
    a. start of making a strukture on year getting the years you need (in rows)
    b. generate a structure with 1 the key figure "sales" and second a formula which equals zero
    c. press Cells in your menubar and give all the combination of Sales and years a cell reference.
    d. Create formulas in the combination of year/Formula=0 and just make the formula this years sales - last years sales.
    This is a lot like Excel but also is'nt very handy for navigating and hence not a solution I normally would recomend
    If you are not on the other hand restricted to the way it has to look I would generate 3 columns with restricted key figures.
    1 with filter on Fiscal Year (0FISCYEAR) taking Current year and key figure sales
    2 With filter on Fiscal Year taking Current year and an offset of -1 and key figure sales
    3 Same and offset -2
    Last I would make 2 formulas giving me the differences.
    But as mentioned there are many ways of achieving your goal - maybe someone will have a better way
    Best Regards
    Xavier

  • Timer( ) resolution in CVI 2009 SP1

    In the CVI 2009 SP1 Contents Help for Timer() function I find
    The resolution is normally 1 microsecond. However, if you set the useDefaultTimer configuration option to True, the resolution is 55 milliseconds.
    But if you click on the useDefaultTimer hyperlink, a new page is opened, where you can read that the resolution is 1 millisecond if you set useDefaultTimer to False.
    Which is the right resolution?
    I wrote my application considering 1 microsecond, but I found strange problems, and I think it is 1 ms.
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

    Hi vix,
    Thanks for bringing those documentation problems to our attention.
    1. There does seem to be a problem with a lot of the function prototypes in the .chm help in the CVI 2009 SP1 and 2010 versions, where an extra asterisk seems to have been added to a number of output parameters. We'll fix this and post a corrected version of the affected .chm files as soon as possible. In all these cases, the parameter data type as it appears in the Parameters section of the help topic is correct, as is the prototype in the corresponding function panel.
    2. Concerning the timer resolution issues, the async timer resolution is in fact 1 millisecond, as confirmed by the GetAsyncTimerResolution function. But note that asynchronous timers are a library in and of themselves, and are not covered by what is discussed in the documentation of the Timer() function or the useDefaultTimer option.
    The resolution of the Timer() function should be 1 microsecond, as of CVI 9.0 and later. The function documentation is correct. When that change was made, however, the documentation of the useDefaultTimer option was incorrectly not updated. It should say that "the performance counter timer provides a resolution of 1 microsecond".
    You mentioned that you didn't think that the resolution of the Timer() function was 1 microsecond. If you run the following code, what do you see?
    int     i;
    double  time[10];
    for (i = 0; i < 10; i++)
        time[i] = Timer();
    for (i = 0; i < 10; i++)
        DebugPrintf ("timer = %f\n", time[i]);

  • CVI 2009 + NIDAQMX ?

    Bonjour,
    J'ai installé une version d'essai CVI 2009 et lors de la compilation d'un ancien projet (historiquement sous 8.0) j'ai des problème de link sur la bibliothèque NI-DAQMX ...
    Cela vient-il d'un problème de compatibilité avec mon ancien NI-DAQ ? Si oui quelle version dois-je utiliser avec CVI 2009 ?
    Merci d'avance 
    Résolu !
    Accéder à la solution.

    Bonjour,
    J'ai besoin de quelques informations supplémentaires pour vous aider. Quelle version de NI-DAQ, NI-DAQmx utilisez-vous ? Sur quel OS êtes-vous? Quelles sont les problèmes de link que vous avez rencontré, pouvez-vous copier les messages d'erreurs ?
    Avez-vous encore la version 8.0 de CVI installé en même temps sur le pc ? Si oui, ce document peut vous aider :
    Installing DAQ Support for Multiple Versions of LabWindows/CVI
    Cordialement,
    Charlotte F. | CLAD
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> "Du 11 octobre au 17 novembre, 2 sessions en parallèle : bien démarrer - approfondir vos connais...

  • CVI 2009 Base Package won't activate CVI 8.1

    I own a license for CVI 2009 Base Package, which is activated and works correctly.  A customer of ours requires that we use CVI 8.1.
    When I launch CVI 8.1, I first got an evaluation period, but now I'm unable to launch at all since the evaluation is expired.
    I already tried removing my cvi_base_pkg_080100.lc and downloading the new one from NI's site (http://joule.ni.com/nidu/cds/view/p/id/78/lang/en).
    License manager shows that the license is installed correctly:
    What should I do next?
    Josh W.
    Certified TestStand Architect
    Formerly blue

    Louis,
    Thanks for cluing me into how NILM works with NI software.  I didn't realize that it was linked as a static library.  I had seen in the past when NI moved to WinVista-compliant paths that licenses didn't need to be in the old folders and that software pre-change and post-change worked equally well with the new folders, so I had guessed that it was all handled by the NILM runtime.
    Nick,
    This may not be a reproduceable case.  I wish I could tell you my install order...but unfortunately this machine isn't that clean.  I think the order goes something like this, but I'm not completely certain:
    Install CVI 7.1 (eval)
    Install CVI 2010 (eval)
    Install CVI 8.1 (eval)
    Install TestStand 4.2.1 (eval)
    Install TestStand 2010 beta (beta license)
    License CVI 2010 & CVI 7.1
    Install LabVIEW 2010 (full)
    Uninstall TestStand 2010 (after beta expires)
    Uninstall TestStand 4.2.1
    I originally had all of the usual license files for CVI, but I removed the extraneous ones (full/debug/etc.) as part of my debugging to make sure they weren't interferring in some way. I still have those licenses, they're just in a subfolder called 'old' within the Licenses folder.
    My UAC is set to "Notify me only when programs try to make changes to my computer (do not dim my desktop)".
    I'm logged in as "VIRGINIA\Josh" (VIRGINIA is the name of our local domain), and I'm an administrator.
    If you can't reproduce this, and it's not immediately obvious what's causing it, don't spend too much time at it. I'm worried it's an interaction between the TestStand beta license expiring, and the CVI license being in eval at that time.  I can work around it for now (I can write the code on my machine where I have better monitors and then compile it on a test machine where it licenses correctly).  We're also considering moving to Win7 x64 by the end of the year, so I'll have to re-install everything then anyway.
    Josh W.
    Certified TestStand Architect
    Formerly blue

  • After upgrading to Mountain Lion my 2009 (early 2010) iMac mutes audio when awaking or when it goes to sleep. Anybody else having the problem?

    After upgrading to Mountain Lion my 2009 (early 2010) iMac mutes audio when awaking or when it goes to sleep. Anybody else having the problem? My other iMacs are not having that problem. I'm not sure if I am missing an option somewhere or what is going on.

    http://www.reedcorner.net/understanding-upgrade-nightmares/ (Thomas)
    See if you have supported applications > http://www.roaringapps.com

  • I want to install a new hard drive on my 2008 MacBook but do not have the instillation discs that came with my computer.  Can I use instillation discs from a 2009 or 2010 MacBook?

    I want to install a new hard drive on my 2008 MacBook but do not have the instillation discs that came with my computer.  Can I use instillation discs from a 2009 or 2010 MacBook?  The hard drive I am planning to install is a WD Scorpio Black 500GB SATA 2.5'' internal hard drive.

    Sometimes they do work - i've done it before.  I have a late 2008 Macbook Uni and used the install dvd of my 2009 Macbook White and it worked.
    Why not just clone your hard drive?  It'll save you a lot of time doing a clone rather than doing a clean install.
    Unless you're having issues with your old set up or  your old hard drive is dead.
    You can download Carbon Copy Cloner - install your new hard drive in a external usb enclosure (around $10) and clone fromt here then test it before you install it in your Macbook.
    Once you've done the swap, you can install your old hard drive in the USB enclosure and use it as a backup drive.
    Good luck

  • Hi, we are using mac mini's for our developement purpose. connecting the same through using Real VNC. Mac mini's are late 2009 and 2010. Now we have upgraded them to 10.8.5. after upgrading having display issues after launching the simulators

    hi, we are using mac mini's for our developement purpose. connecting the same through using Real VNC. Mac mini's are late 2009 and 2010. Now we have upgraded them to 10.8.5. after upgrading having display issues after launching the simulators, we are unable to view the icons we need to move the simulator (into different places) to view the icons.
    Also we are having Mac book pro's (Late 2009 & 2010) after upgrading them to 10.8.5. Unable to launch the mac, getting only white screen with apple icon.
    Let me know is there any specific Hardware (Graphic Cards) we need to use for the same.
    Please provide me the early solutions.
    Regards,
    Suresh.

    Hi, try this first...
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.

  • How to use CVI 2009 with CVI 2012 installed

    I have TestStand 2012 / CVI 2012 installed. 
    I need to also test using teststand 4.2.1 / CVI 2009.
    I installed teststand 4.2.1 / CVI 2009 and can activate teststand 4.2.1 but I cannot access CVI 2009. 
    Is there any way to have CVI2009/2012 both available on the same computer? 
    Is there a way to compile CVI 2012 to work with TestStand 4.2.1?

    Hi HMRJ,
    You can have multiple versions of CVI installed on the same computer. Can you explain in detail what you mean when you say that you cannot access CVI 2009? Do you mean that you can't open it or can't activate it?
    I am not sure I understand what you mean by compiling CVI 2012 to work with TestStand 4.2.1. You should be able to create a DLL from CVI 2012 and call this code module from TestStand. Are you receiving any errors when you try to do this?
    Regards,
    Anjelica W.
    National Instruments
    Applications Engineer

  • What hard drive would be best for a 2009 or 2010 I-mac

    I have an I-Mac that is from either 2009 or 2010. latly it has been freezing and laging. what hard drive would be good to increase speed and add more space, that is compatible with my model Mac?

    Here are two that seem to be favorites among users:
    http://www.crucial.com/
    http://www.macsales.com/

  • NIReport_Print LabWindows 2009 vs 2010

    I have code complied under LabWindows 2009 that is working, but when I complie it under LabWindows 2010 it stops working.
    I am trying to create pdfs using Adobe Distiller, functions like PrintPanel and PrintTextBuffer work in both 2009 and 2010.  However,
    NIReport_Print only works in 2009, if I try to print to Adobe.  It works printing to a real printer.
    I have attached the code the works and doesn't work.
    /* print report to the default real printer - THIS WORKS */
      if(!iLocalFail)
       iLocalFail = Report_ErrorHandler(NIReport_Print(iReportHandle, NULL, 1), "Report Print");
    /* set printer to adobe pdf to create pdfs */
      iLocalFail = SetPrintAttribute(ATTR_PRINTER_NAME, "Adobe PDF");
      if(iLocalFail < 0)
       printf("SetPrintAttribute was %d\n%s\n", iLocalFail, GetUILErrorString(iLocalFail));
    /* create the key for the buffer test */  
      if(!iLocalFail)
         sprintf(caFilenameWithPathInfo, "%sBuffer_%s.pdf", TEST_DIRECTORY, caMyTime);
        iLocalFail = RegWriteString(REGKEY_HKCU, ADOBE_KEY, ADOBE_NAME, (unsigned char * ) caFilenameWithPathInfo);
        if(iLocalFail < 0)
          sprintf(caMessage, "RegWriteString Failed.\n, Error was %d.\n%s\n", iLocalFail, GetGeneralErrorString(iLocalFail));
          MessagePopup("RegWriteString", caMessage);
          iLocalFail = TRUE;
        else
         printf("Printing Buffer\n");
    /*THIS WORKS */
    /* read a dummy file to get data into a buffer and then print to the adobe printer */
      iFileHandle = OpenFile("c:\\mfgtests\\pdf_tester\\globals.h", VAL_READ_ONLY, VAL_OPEN_AS_IS, VAL_ASCII);
      if(iFileHandle > 0)
        ReadFile(iFileHandle, caBuffer, 50000);
        PrintTextBuffer(caBuffer, "");     /* "" for printer becasue of SetPrintAttribute */
    /* create the key for the panel test */  
      if(!iLocalFail)
        sprintf(caFilenameWithPathInfo, "%sPanel_%s.pdf", TEST_DIRECTORY, caMyTime);
        iLocalFail = RegWriteString(REGKEY_HKCU, ADOBE_KEY, ADOBE_NAME, (unsigned char * ) caFilenameWithPathInfo);
        if(iLocalFail < 0)
          sprintf(caMessage, "RegWriteString Failed.\n, Error was %d.\n%s\n", iLocalFail, GetGeneralErrorString(iLocalFail));
          MessagePopup("RegWriteString", caMessage);
          iLocalFail = TRUE;
        else
         printf("Printing %s\n", caFilenameWithPathInfo);
    /* THIS WORKS */
    /* print the panel, NULL for printer because of SetPrintAttribute */
      iLocalFail = PrintPanel(ghMainPanel, NULL, 1, VAL_FULL_PANEL, 0);
      if(iLocalFail < 0)
        sprintf(caMessage, "Error was %d.\n%s\n", iLocalFail, GetUILErrorString(iLocalFail));
        MessagePopup("Print Panel Failed", caMessage);
    /* create the key for the report test */  
      if(!iLocalFail)
        sprintf(caFilenameWithPathInfo, "%sReport_%s.pdf", TEST_DIRECTORY, caMyTime);
        iLocalFail = RegWriteString(REGKEY_HKCU, ADOBE_KEY, ADOBE_NAME, (unsigned char * ) caFilenameWithPathInfo);
        if(iLocalFail < 0)
          sprintf(caMessage, "RegWriteString Failed.\n, Error was %d.\n%s\n", iLocalFail, GetGeneralErrorString(iLocalFail));
          MessagePopup("RegWriteString", caMessage);
          iLocalFail = TRUE;
        else
         printf("Report Handle %d Printing %s\n", iReportHandle, caFilenameWithPathInfo);
    /* THIS DOESN'T WORK */  
    /* print the report, NULL for printer because of SetPrintAttribute */
      if(!iLocalFail)
       iLocalFail = Report_ErrorHandler(NIReport_Print(iReportHandle, NULL, 1), "Report Print");
      printf("Done\n");
      NIReport_Discard(iReportHandle);
    Solved!
    Go to Solution.

    Hi Paul,
    Are you receiving any specific errors? Could you post a screen shot of it if you are getting one? That would help us understand what is happening a little better. Thanks.
    Regards,
    Perry S.
    Applications Engineer
    National Instruments

  • LabWindows CVI 2009 Word_Rpt routines: Document is corrupted: Error reported: The MSWORD.OLB file cannot be opened.?

    Using WordRpt support routines with a C application in LabWindows CVI 2009 to format Word files, an error sometimes occurs resulting in the document format being corrupted.  An error  is generated: The MSWORD.OLB file cannot be opened.  I don't know why or how to correct this problem.
    Any help you can provide would be appreciated!

    Hi LPR1,
    Do you have an application that reproduces this.  If so, do you mind posting it?
    Regards,
    Hassan Atassi
    NI Community Project Engineer

  • Can't open .prj files CVI 2009

    Running CVI 2009 and everything had been running fine for weeks.  Shut down test program that was running.  Installed my license device and went to my .prj file to open it up in debug mode.  When I double clicked on it, Windows says it can't find the file, even though it is sitting right there in explorer, it will not open it.  Tried several other .prj files and it does the same thing.  Tried opening CVI by itself and then loading the .prj file, but the splash screen comes up and then it never does anything else.  Rebooted several times (running XP SP3), then finally tried to do a repair of the CVI install.  This didn't help and it did the same thing.  Then deleted everything and did a fresh install...it still says it can't find the .prj file.  It seems like something has gotten corrupted in my Windows install maybe??  Probably going to try and re-image the machine, but trying to figure out what happened.  Anyone seen anything like this ever before???
    Thanks for any info...
    EDGE

    Hi EDGE,
    I haven't run into a similar error in the past but keep us posted on if reimaging the machine resolves the issue.
    Best Regards,
    Swathi B

  • CVI 2009 Very slow installation of distribution kits

    I'm having an issue with distribution kits built with CVI 2009 taking a long time to install on some PCs.  In the installer, the progress bars will both be completely full, with the top one displaying "Overall Progress" "Currently Installing [application name].  Part 1 of 1."  The bottom bar displays nothing.  During this time, there is usually a few instances of msiexec.exe sucking up considerable CPU time according to Task Manager, and the disk does not appear busy.  If I wait several minutes (sometimes 10 minutes or more), it will eventually move on, with the next step displaying "Validating Install..." on the bottom progress bar.  This only happens on some PCs, other ones install in a reasonable amount of time (less than a minute).  Once the installation is complete, everything appears to have worked and the installed software runs fine.  The only pattern I've noticed that the PCs that show this problem tend to be older models.  One is a P4 3.2Ghz desktop with 1.5GB of ram, and the other is a Core Duo (not sure about speed at the moment) Dell laptop with 2GB of ram.  Both are running Windows XP SP3.  
    Any insight into this would be appreciated, as some of the PCs that show this are ones used for testing software packages and often having things installed onto them.  Thanks.

    Hi tstanley,
    I was wondering what you were running distribution kits from - hard drive, CD, network or USB stick?
    Charlie Rodway
    Test Design Engineer
    Rolls-Royce Controls and Data Services Ltd

  • SqlToolkit Problem with CVI 2009 and Windows7

    Hello,
    I'm using the test version of CVI 2009 and have a problem with the sql toolkit which works fine under CVI 8.5.
    DBNewConnection()  returns always -100 and the error message is NULL.
    Did you have any ideas what causes this problem and how it can be solved?
    Thanks in advance
    Inomed1

    Hello Inomed1
    have you tried to reinstall the SQL Toolkit?  I found some cases in the past where this has been helpful. 
    For further investigation it would be interesing witch DBMS is used?
    Regards
    Moritz M. 

Maybe you are looking for

  • Firmware updation problem

    I tried to update my mobile 5610 number of times. software updater detects the mobile but failed after some time with error message "Software update failed" Network Connection lost. Check your network connection or whether a firewall is preventing th

  • Freaky nested sequences

    Hi, anyone experienced the following: When double clicking on a nested sequence in the timeline to edit that sequence, any edits or changes you make to that sequence do not update back in the parent timeline. For instance if you cut a clip out or rea

  • ESS/MSS Standard workflow not triggered....

    Hi Experts,          I have small doubt, but why can't I solve this I does't know? Kindly some one help me on this issue. Scenario as follows...         I have copied the standard loan workflow "WS18900041" to my custom workflow. So, Here when I appl

  • Time Machine Disk Icon not Displaying Properly After Reconnect

    I'm noticing a little oddity that has been happening since I upgraded to Mavericks.  If I disconnect my Time Machine (TM) volume, then, reconnect it later and perform a backup, the disk icon on my desktop isn't changing to the green TM icon, it's sti

  • Warehouse items question

    Warehouse Item Records question   When creating a New Warehouse then automatically New Item records are also created. The Item Records created for the New Warehouse are empty Item records based on the Original warehouse initially created when we star