Is there a way to detect if Excel is busy?

I have a VI that is testing three products at the same time, and writing data to three different excel spreadsheets.  If more than one subvi is writing to Excel at the same time, I get an error.  Is there a way to detect if Excel is busy, and wait until it is not busy?
metzler CLAD

The correct answer is the one that Putnam (and others) suggested: Encapsulate all the logic to perform a single write into a VI that is used wherever you need to write to an Excel file. This structure will guarantee that the code will only be writing to Excel from one place at a time.
If you don't want to have the different sections of the code waiting for their turn to come up, a variation on the theme would be to create a separate stanalone process that does nothing but write to Excel files. The rest of the code would pass it the data to be written using a queue. With this approach everybody seems to write at the same time, but the standalone process is actually serializing the Excel operations. This approach could even be extended to include the ability to read from files, but that is as they say, "...left as an exercise for the reader..."
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Is there a way to detect two keys at the same time?

    Is there a way to detect the keys if the user is holding two keys down at the same time?

    yes, but you'll have to check outside of the event loop (i.e. don't check for it in the keyPressed method).
    just use an array of keys that keeps track of which keys are currently down and which are up. you could use a boolean array but I use an int array because... Im not sure I've just done it probably because of my C background. anyway, basic setup:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class MultiKey extends JFrame {
         int keys[];
         public MultiKey() {
              super();
              keys = new int[256];
              Arrays.fill(keys,0); // 0 = key is up
              enableEvents(AWTEvent.KEY_EVENT_MASK);
              show();
         public void processKeyEvent(KeyEvent e) {
              // the 0xff below binds the key code to below 256
              int key = (e.getKeyCode()&0xff);
              if (e.getID() == KeyEvent.KEY_PRESSED) {
                   keys[key] = 1; // 1 = key is down
              else if (e.getID() == KeyEvent.KEY_RELEASED) {
                   keys[key] = 0; // 0 = key is up
         protected boolean isKeyDown(int key) {
              return (keys[key] != 0);
         protected boolean isKeyUp(int key) {
              return (keys[key] == 0);
    }so now at any time in your code you can check key state by using the isKeyUp and isKeyDown methods. this is about as close as you get to input polling in java unless you use LWJGL or something similiar ;)
    you can try out a full executable example at my site here - just open up the jar and start holding keys down :)

  • Is there a way to detect all the photos already transferred to double (or triple) in iPhoto, so do not occupy space unnecessarily? Thank you from France.

    Is there a way to detect all the photos already transferred to double (or triple) in iPhoto, so do not occupy space unnecessarily? thanks from France

    Look in you main photo library. Are there doubles or triple photos there? If so delete the extras.
    All photos are stored in the photo library. When you move a photo into an album the photo is not duplicated. The album contains a pointer back to the original photos. These pointers or aliases take up very little space.

  • Is there a way to detect motion and set markers automatically?

    My video includes walking around with the camera.  I walk, then stop and hold the camera in one area, then pan, then continue walking (and repeat). 
    While panning, there is some annoying flicker of vertical objects (beams, poles, whatever).  I can use a horizontal fast blur to fix this, but I only want the blur applied when there is panning (not when the camera is relatively still).  Doing it manually is cumbersome.
    Is there a way to detect when motion is going on (over a certain threshold)?  I would like PP to tell me when there is significant motion, and place markers in the points where it begins and ends (when motion goes over a threshold and then when it falls below the threshold).
    Thanks, experts!

    One thing you can try is to bring your footage into Prelude - it will lay out the entire clip so you can see thumbnail snapshots for the whole clip at once - that might give you a good start to see where there is a lot of motion.  Then, you can add markers very easily at all of those points - and when you send it over to Premiere, the markers will show up on your clip. 
    Not automated, but a good workflow to achieve what you are looking for.

  • Is there a way to detect a bad http client handle before it locks up LabVIEW?

    The attached VI demonstrates a simple way to hang LabVIEW such that the only way to recover full use of it is to kill the LabVIEW process. LabVIEW version is 11.0.1f2 and this problem will occur in both WinXP and Win7.
    Is there a way to detect when an HTTP Client Handle refnum is stale and should not be used?
    Is this a known bug?
    Attachments:
    Hang after Bad HTTP Client Handle.vi ‏15 KB

    Have you tried the bad reference comparator?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Is there a way to detect a other iphone near me

    Is there a way to detect a other iphone near me with a app or any other functionality of the iphone

    Just any iPhone? or one in particular?
    Find my Friends will allow you to locate people who have iPhones and have explicitly agreed to share their location with you. There are some third party apps which will allow you to locate people as well.
    Other than that, no.

  • Is there a way to detect the end of a video?

    Is there a way to detect the end of a video.. .mp4 or youtube? I want to be able to detect the end of a video and then have it do something...ie play on timeline or go to and play symbol.

    For youtube the code would be something like this:
    view-source:calkaweb.herobo.com/video.html
    for HTML5 videos for youtube replace &version=3 with &html5=1 in the youtube URL
    I have no idea how to impletent the youtube code into Edge tho other than an iframe but that wouldn't work I've tried :
    http://forums.adobe.com/thread/1285212
    You would need to place all of the youtube codes into edge in order for it to work but I duno how to do that and no1 answered the question in the thread I made about it.
    as for MP4/HTML5 video you can use
    var video = document.getElementsByTagName('video')[0];
        video.onended = function(e) {
          /*Do Something*/

  • Hi is there a way to access my excel and work files on my mac from my ipad out on the go

    is there a way to access my excel files and word files on my imac while out on ipad on the road

    No, not with an older PPC iMac, which is what this forum covers.

  • SAP: SystemCommand=N*TACODE. Is there a Way to export to Excel directly?

    Hi!
    Im Using a SAP-Desktop-Link to login automatically, start a transaction, passing values to dynpro fields.
    That works Fine.
    The mylink.sap opened in an texteditor looks like this:
    SystemCommand=N*FBL3N -dynprofield1=foo;-dynprofield2=bar
    is there a way to pass some output formatting option to export it to excel and save it on the harddisk?
    something like
    SystemCommand=N*FBL3N -dynprofield1=foo;-dynprofield2=bar -outputFormat=Excel > C:\myresult.xls
    Using RFC or Sap Gui Scripting seems to me a way overkill for such a simple task.
    Thank you in Advance for your help
    attila

    Hi ,
    We can export the crystal report in Excel sheet however it is not pssible to export different pages of report to difrent excel sheets.
    Regards,
    Pradnya Kokil

  • Puzzler - Is there a way to detect when an external headphone or speaker is plugged in?

    I have a puzzler, and my initial question is simply, is there a way to see via Windows if/when an external headphone or microphone is plugged in, or is that all an electrical circuit independent of the OS?
    Background: (not necessarily the question I'm asking, but providing anyway):
    The background is this:  Dozens, Hundreds, I think Thousands of owners of Toshiba Satellite owners with Conexant sound devices (including myself) the world over have this problem where the sound stops working about 1 to 2 minutes into playing non-stop
    sounds/music/videos.  In spite of all the experts telling these poor people to run a system restore and wipe out the past years of files and everything on their computer, the problem prevails no matter what.  Some have even installed Linux, and the
    problem persists. To me, it seems that the problem doesn't occur if the only sounds are the occasional bing or bong from a system warning, it seems to fail after 1 to 2 minutes of continuous play (but this particular observation is mine only, nobody else has
    taken the time to point that out).
    A few have claimed success via blowing the jacks out with compressed air, but that's not repeatable universally.  Most people end up keeping external speakers plugged in permanently. In other words, it seems a lot like a hardware problem; However,
    {edit 3}, my addition of "Edit 2" below makes it seem less like hardware.
    One interesting thing:  Headphones/speakers work permanently, there's no problem.  More curiously, when the sound goes out, plugging any form of headphone/microphone jack into
    EITHER the headphone
    OR the microphone jack turns the sound back on too.  This includes male-to-male extension cable with nothing installed.  If nothing is on the other end, the sound will go out
    again shortly, but jiggling or removing the male to male turns it back on.
    EDIT 2: When the sound goes out, another way to get it back: From system tray, right click the speaker item and choose SOUNDS.  The virtual VU meter shows that audio is playing (in tandem with the song, etc.), and is still showing audio
    playing.  The tabs available are Playback, Recording, Sounds, and Communications.  When the sound does stop (assuming I was watching Playback), I click the Recording tab (just the tab header), and sound starts again.
    P.S. What's the difference between "High Definition Audio Controller" under System Devices, and "Conexant SmartAudio HD" under "Sound, Video, and Game Controllers", in Device Manager?  The "conexant smartaudio hd"
    points to the latest Conexant driver, the "High Definition Audio Controller" points to a default windows driver.  Just curious
    I've Binged this extensively:  Toshiba doesn't acknowledge the problem and nobody has fully solved the issue. I'm just curiously trying a few things myself, and I'm not sure if there's a way for the system to tell me an external mic/speaker has been
    plugged in.
    So to recap:  My main question, can I detect when the computer thinks a headphone or microphone is plugged in? (My theory, if I can prove that the computer THINKS something is plugged in, it's a start). 
    Only secondarily, if anyone's interested, feel free to suggest ideas (here's what dozens of other posts have disproven: System restore; windows reinstall; outdated sound driver; outdated video driver; remove and re-detect sound and device via device manager;
    malware; BIOS upgrade; Flash and/or the Flash/Firefox/Hardware Acceleration issue (problem happens with MP3, Flash, WMA, HTML5, Games, everything).
    Thanks in advance!
    EDIT: One person (theirs was under warranty, mine's not) ended up getting a new motherboard & speaker via Toshiba warranty, diagnosis ""machine intermittent no sound due to PCB faulty".  I'm still interested in troubleshooting,
    though.  Link:
    One lucky person, who got their motherboard replaced (they were under warranty, most of us aren't)

    Hi,
    If there are any headphone or speaker plugged in and detected, it will show in audio device manager console.
    Type mmsys.cpl in Run, it will open Sound console.
    Have you tried Hardware and Sound troubleshooter?
    Andy Altmann
    TechNet Community Support

  • Is there a way of sharing an excel file between my MacPro and IPhone 5?

    Hello,
    I would like to share an excel file developed on my MacPro with my IPhone 5.  Is there a way of doing this?  I would like to work on my excel file on my Mac, and then have the file on my IPhone to carry the info with me.  Please help.  Thanks!

    Dropbox, box.net, skydrive, cubby, sugarsync... the list goes on...

  • Is there a way to detect each pulse of a signal

    Hi All,
    I need to detect every pulse of my input signal pulse, is there a way to do that, I tried using basic level triggering but the trigger doesnot switch true and false between pulses.
    I need to detect the input pulse for some ms  and then generate an output pulse at the falling edge of the input pulse.
    can someone tell me way to do that, i do have a daq board usb 6361, but couldnt find a proper way to do something like this.
    my input signal frequency varies between 100-450 hz with amp -0.1v and pulse width of 5 microsecond

    I think we can do this with some extra circuitry.  First of all, we need to gain up that input puse to be a +5V.  You will need an inverting amplifier with a gain of 50.  Now you have a TTL level signal that you can feed into a PFI line to use as a trigger.  You can use an analog output to output a waveform (your 2V pulse) when that trigger line goes high.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is there a way to detect the event when device goes to sleep and the screen blackens?

    I want to detect the event when the iOS device goes to sleep and the screen blackens?
    Is there any way to do it?

    Hi,
    A small idea, please check whether it will work or not.
    You can achieve this by using combination of DNS server and reverse proxy server.( Customized apache). Make 'A' record for www.abcd.com to reverse proxy server IP address in your DNS.
    So it will resolve your reverse proxy IP address for requests.
    Configure appche to accept incoming request for www.abcd.com and points towards www.abcd.com/parameters.
    I think this will solve your problem.  Only one condition is that proxy server will communicate with www.abcd.com on behalf of client.
    Follow the link for configuration of reverse proxy server
    http://www.slashroot.in/how-configure-basic-apache-reverse-proxy
    HTH
    Naisam

  • Is there a way to open old Excel 2004 files in Excel 2011?

    I recently bought a new MacBook Pro running Mountain Lion, and installed the latest version of Office 2011 for Mac. THEN I discovered that some of my older Excel workbooks, created on my ancient PowerBook G4 back in 2007, WON'T OPEN. I get a message saying that there is an error, and then Excel crashes. I really need to get access to this workbook on my new computer! It opens just fine in older versions of Excel, no corruption issues at all. It's just when I try to open it with my new laptop and Excel 2011. Does anybody out there have a workaround for me? I have loads of data in this spreadsheet and now no way to access it! Help!

    Make sure Office 2011 is fully updated. It shouldn't have a problem opening those documents.
    When I open a 97 - 2004 workbook, it states that it needs to be converted. That may be what is crashing on your copy of Office.
    Have you tried creating a new account and see if you can open them there.

  • Project Server 2010: Is there any way to export to excel the Graph part of a view?

    We need the graphical part of a project center view in a file, is there any way to export this to excel?
    Thanks in advance.

    Hi EPM Quest,
    Unfortunately the Gantt chart of the project center views cannot be exported as is in Excel.
    But based on projects data, you can build a Gantt chart in Excel. See Office article below:
    http://office.microsoft.com/en-us/excel-help/create-a-gantt-chart-in-excel-HA001034605.aspx
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

Maybe you are looking for