ActiveX Excel Prevent Open File While Writting

I'm having some of the same problems with Excel and ActiveX found here:
http://forums.ni.com/ni/board/message?board.id=170​&message.id=254019&view=by_date_ascending&page=1
The last post from the above link gives an acceptable workaround (not ideal, but hey, what can you do?) to preventing the user from closing Excel when files are being written to with ActiveX through LabVIEW (since a user can open an Excel file while LV is writting to Excel files with ActiveX and all the files will share the same Excel application, instead of Excel opening a seperate application like one would hope).
My question for this post: In the previous post Ben had a problem with the user opening a different Excel file than those being written to. My VI opens an exisiting Excel file (test.xls) and writes to it. If the user opens test.xls while LV is still writting test.xls, it will throw an error. Note that the error is not thrown if test.xls is open before the VI starts writting to it, only if the user opens it while its being written to by LV.
Any ideas on how to lock the file so the user can't open it while it is being used by LV?
Michael

Thanks thols. Thats a great solution, I actually had tried it but gave it up since the user could close out of "their" Excel (closing the reference), then open a new spreadsheet which would open in "my" Excel (if done while my subVI was still writing to Excel). At the time, this was a possible scenario for my program, and since I was writing so slowly had happened. I just sped up the writing of the Excel file (I had all the data to write, but was writing with "Set Cell Value.vi", which wrote one cell at a time; instead I wrote whole ranges of data). If Excel was already open, I would set interactive to false and have my spreadsheet minimized while writing to it. If Excel wasn't open, I would just make it invisible. Since I cut the time down to about a second, this worked for my application.
Michael

Similar Messages

  • Java.io.IOException: Too many open files while deploying in soa 11g

    hi all,
    I am getting a strange error while deploying any composite .. it's a hello world kinda composite but while i am trying to deploy it i am getting "java.io.IOException: Too many open files" while deployment.. i have tried to deploy it in 2-3 ways but all of them resulted in the same error..bouncing the soa server might be an option but can someone give an insight as why it is happening and can it be resolved without restarting the server..
    Thanks

    yes..so this problem is with unix only ..coz i previously worked in Windows ..never got this problem..

  • Photoshop gives "Program Error" when I try to open files while VPN

    I think this may be a new one. While VPN on my company network, Photoshop CS cannot open any files. Either drag and drop, double click or even file open command. You get the clock and the message "failed to open because of a Program Error.... " or something close to that. I'm sure it says Program Error though. Works fine if I'm not VPN but soon as I'm on it stops opening files or even creating a new blank canvas gives that error. I checked Adobe forum and nothing there to find about this one. Anyone else have this happen?

    Hi, SSI.
    1. What VPN client are you using?
    As a guess, your VPN client may be blocking a port that PS CS may use for license verification over the Internet. The fact that it works AOK when not using the VPN would tend to support this hypothesis. As to what port it may be attempting to use, I can't say, but you may be able to find this out from Adobe and then work with your firm's networking staff to see if this port can be opened for use when the VPN is active.
    2. You noted that you "checked Adobe forum and nothing there to find about this one." Did you post to the Adobe Photoshop forum? If not, I recommend doing so.
    3. You wrote: "You get the clock and the message "failed to open because of a Program Error.... " or something close to that. I'm sure it says Program Error though."As FYI, in cases such as this, copying down the exact text of the message is helpful.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • Adding a letter to names of open files while saving

    I would like to be able to run an [action (?)] script to all open files in photoshop that 1. adds the letter "e" to the beginning of the current filename and 2. saves the file as a .jpg
    I am sorry if a similar question has been answered before, I cannot seem to find it... and/or I do not know enough about scripting to be able to edit it to do what I want it to.
    It is totally possible that I also do not know the simplest way to do this, so suggestions are welcome- I am trying to streamline my saving process. Typically after I run a batch of an action that applies a filter to every open file, I have to go to each and save, adding "e" to the beginning of the filename. I would like for PS to do this for me!
    Any helpers out there? I would be so appreciative!!
    Thank you!

    Some of the opened documents may need some processing done on it before it can be saved be save as a jpeg.  Like Lab color not supported either is transparency and 32 bit color the easiest way to do it is to download and Install the Image Processor Pro plug-in script.  Then use menu File>Automate>Image processor Pro...  and fill out its dialog something like this

  • PDF Generation Error Message:Couldn't open File while generating PDF from a Frame (7.2 Version) book

    Hi,
    I'm trying to convert a book into PDF and I get the error message Couldn't open a file (... <filename>.fm) and the unavailable Fonts dialog box also appears. The tricky thing is I've converted the same book into PDF just a couple of days ago. Now when I tried to do it again, I get the above mentioned error message. I tried unselecting the File > Prefrences > General > Remember Missing Fonts checkbox too. However, it didn't help in generating the PDF. I will be thankful if anyone suggests a suitable workaround for this issue. Thanks in advance.

    Usually, deselecting Remember missing fonts works.
    The missing fonts message displays when you or FrameMaker opens the file. The workaround is to open all the files in the book, or at least those with the "missing" font, clearing the message for each file. Now print the book to PDF, while keeping the files open. This usually works because you have already cleared any missing fonts messages.

  • Cannot open files while printing

    Does anyone know of a reason why when printing a large pdf (say around 100+ pages) i cannot open another file in the same program? The only way i have found around this is to: open one file to be printed in Reader then once the printing process has begun open another document via Open With and select Acrobat.
    This is slightly more productive than only being able to open one document at a time but only slightly. NOTE* If i open, say 5 documents before i try to print then choose one to print the printing dialog box will appear in each document i have opened; at this point i still cant do anything witht the opened documents but at least i can read them.
    This is really a major hiccup in my daily activites, what other options do i have and is there any way to open a PDF while printing another large one.
    **PLEASE NOTE** There is never an error message that comes up when i try to open a PDF while printing, simply put nothing happens until printing finishes then all of the files will open at once. I had a reccomendation to make sure it wasnt a system resources issue, which I can safely say it is not.
    Your help and observations would be greatly appricated.

    I am still having this really strange problem, anyone have any suggestions? **NOTE** I did try using a different comp to rule out hardware problems, the same thing happens, while printing when you try to open a document nothing happens at all until printing finishes then all of a sudden all the files you tried to open while printing open up all at once. Is there some setting or restriction i dont know about that is forcing me into this? I am printing 100+ pages of paper size Arch D (36X42) so having to wait to do any work on pfd's while this massive print job is going on really sucks. Also the printers are network printers to the information being sent to the printer is off the computer really quickly, so i dont think it has something to do with being lagged out or anything.
    Really any help at all would be great!

  • Unknown Plugins prevent opening files

    I am using CS3 5.0.4 and I get a missing Plugin message asking for Conditional Text.InDesignPlugin and WorldReady.InDesignPlugin when opening clients files. Are these old or missing plugins? InDesign has all the adobe updates to the 5.0.4 version.
    Can I download these plugins and install them into InDesign? How can I get these files to open?

    Thats the problem, I dont really get an error message that should prevent me from opening it.
    The first one is "Missing fonts, The document "3" uses one or more fonts which are not currently available on your system. The text will use a substitute font until the original font becomes available."
    The other is "This document contains links ot missing or modified files. Click Fix Links automatically to have InDesign update this document with the modified files and help you locate missing files. Click Don't Fix to correct the problem yourself using the Links panel" 3 missing links 0- Modified links
    Actually I just opened the file on another computer and its works fine. Tried the same on a mac here at work and it wouldnt open. The only difference is that we have DARWIN installed on the 2 computers that wont open it and the one that did open it doesnt. So it appears to be a DARWIN issue.
    Time to raise a little hell with them I guess.
    Thanks for your attempt to help.

  • Can't open file while loading CLOB

    Following the examples on this forum, I've written the following:
    CREATE DIRECTORY doc_dir AS 'C:\Documents' ;
    DECLARE
    source_file BFILE := BFILENAME('doc_dir', 'test_document.doc');
    dest_lob CLOB;
    amount INTEGER := 4000;
    BEGIN
    DBMS_LOB.FILEOPEN(source_file, DBMS_LOB.FILE_READONLY) ;
    DBMS_LOB.LOADFROMFILE(dest_lob, source_file, amount) ;
    COMMIT ;
    DBMS_LOB.FILECLOSE(source_file) ;
    END ;
    This fails with the following message in SQLPlus:
    DECLARE
    ERROR at line 1:
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at line 9
    Both the directory and file are definitely there, so what gives? Any ideas?

    tell you what take this code.
    SQL> create table test_data(id number, clob_data clob)
      2  /
    Table created.
    SQL>
    SQL> declare
      2    l_clob      clob ;
      3    file_loc    bfile := bfilename('DIR_SWF', 'test2.glt2fe_expanded_cs');
      4    l_lang_ctx  number := 0;
      5    l_Warning   number :=0;
      6    l_src       number :=1;
      7    l_dest      number :=1;
      8  begin
      9      dbms_lob.createtemporary(l_clob, TRUE);
    10      dbms_lob.fileopen(file_loc, dbms_lob.file_readonly);
    11      dbms_lob.loadclobfromfile(l_clob, file_loc, dbms_lob.lobmaxsize, l_Src,l_dest, 0,l_lang_ctx, l_Warning);
    12      dbms_output.put_line(dbms_lob.getlength(l_clob));
    13      insert into test_Data values(1,l_clob);
    14      dbms_lob.fileclose(file_loc);
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select dbms_lob.getlength(clob_data) from test_data
      2  /
    DBMS_LOB.GETLENGTH(CLOB_DATA)                                                  
                             6727                                                   change the filename if it is not correct in the below code.
    create table test_data(id number, clob_data clob)
    declare
      l_clob      clob ;
      file_loc    bfile := bfilename('DOC_DIR', 'test_documents.txt');
      l_lang_ctx  number := 0;
      l_Warning   number :=0;
      l_src       number :=1;
      l_dest      number :=1;
    begin
        dbms_lob.createtemporary(l_clob, TRUE);
        dbms_lob.fileopen(file_loc, dbms_lob.file_readonly);
        dbms_lob.loadclobfromfile(l_clob, file_loc, dbms_lob.lobmaxsize, l_Src,l_dest, 0,l_lang_ctx, l_Warning);
        dbms_output.put_line(dbms_lob.getlength(l_clob));
        insert into test_Data values(1,l_clob);
        dbms_lob.fileclose(file_loc);
    end;
    select dbms_lob.getlength(clob_data) from test_data
    /

  • Can you open files while FileVault is encrypting for first time?

    I cannot open any of my documents on my computer since FileVault started encrypting.. what do I do? I need my notes and documents for classes.

    I can open documents in Word or Microsoft programs, but I cannot open my notes with Preview whatsoever.. I will click on a document and it will not pop up.

  • Excel 2010 SP2 opens files slowly after installing SP2

    After installing SP2 Excel is opening files very slowly. Files can be on network share or locally, no matter. If Excel is already open, then the file opens fast as it has opened before. OS is Windows 7 64-bit, and Office Professional Plus is 32-bit. Ecxel
    itself opens fast, but is slow when I double click file. Slow is about 12 seconds and fast is about 1 second with a 31 KB file from network. Network itself seems to be OK, anf Word files open fast.

    From your description, I understand that you open EXCEL 2010 SP2 32-bit slowly in Windows 7 64bit.
    Try to start Excel in safe mode. Then, open the Excel file.
    Start the Excel program in safe mode
    1.       Click Start, point to All Programs, and then point to Microsoft Office.
    2.        Press and hold the CTRL key, and then click the Microsoft Excel.
    If the problem does not occur in the safe mode, this issue might be related to some third-party add-ins in the Excel program, we can try to disable them.
    Normally, you could do the following to disable the conflict add-ins in your Excel program:
    Disable add-ins
    Click File menu, click Options >  Add-in, click Go button in the Manage: Com-in Add.
    Check if there are any add-ins, clear the checkbox to disable them.
    Close the Office program and restart it.
    Add one check back each time to the list of Add-In, restart the Office program, and repeat the above procedure. Once the issue reappears again, we can determine which add-in causes this problem and then disable it.
    Please take your time to try the suggestions and let me know the results at your earliest convenience.  If anything is unclear or if there is anything I can do for you, please feel free to let me know.
    Is the performance also slow when you trying to open?
    At this time, we can also try to test this issue in the clean boot mode.
    Test in Clean boot Mode
    ===============
    Let’s disable all startup items and third party services when booting. This method will help us determine if this issue is caused by a loading program or service. Please perform the following steps:
    1.       Click the Start Button type "msconfig" (without quotation marks) in the Start Search box, and then press Enter.
               Note: If prompted, please click Continue on the User Account Control (UAC) window.
    2.        Click the "Services" tab, check the "Hide All Microsoft Services" box and click "Disable All" (if it is not gray).
    3.       Click the "Startup" tab, click "Disable All" and click "OK".
    Then, restart computer. When the "System Configuration Utility" window appears, please check the "Don't show this message or launch the System Configuration Utility when Windows starts" box and click OK.
    Note: Temporarily disabling the Startup Group only prevents the startup programs from loading at startup. This should not affect the system or other programs. We may still manually run these programs later.

  • Export Datatable to Excel 2010 format and Save in SharePoint Document library ,and whn opening file getting error "WorkBook may be in unsupported file format "

    im converting stringwriter objec to Memory stream and saving this as .xlsx uploading file in library ,but when i try to open the file im getting error as below
    WorkBook may be in unsupported file format
    and when trying to open in excel getting message as
    Excel cannot open file  because file extention or file format is not valid .verify thet the file has not been corrupted and file extensions match file format

    May be you can use this approach:
    http://www.c-sharpcorner.com/UploadFile/pandeypradip/export-data-into-excel-in-a-pre-defined-template-using-strea/

  • Excel 2010 "Open" dialog box slow over DFS share

    Hi everyone,
    We're having some issues with clients using Windows XP and Office 2010. We have recently migrated from some Novell OES file server to a Win 2008R2 file server with DFS. When the users try to open any file from this new FS directly from Excel's "Open
    file" dialog box, when they "surf" through folders in this new fs, it takes aprox. 45sec~1min to populate folders. It doesn't occur if users search files using Windows Explorer, it only occurs directly from Office apps. Neither occurs in PCs
    using Windows 7.
    Thanks in advance!
    Matias

    Hi,
    The issue may be caused by the SMB. As far as I know, Windows Xp supports SMBv1 and the Windows server 2008 R2 supports SMBv2. Thus, I recommend we try to disable SMBv2 in Windows server 2008 R2 to test:
    To enable or disable SMBv2 on the SMB server, configure the following registry key:
    Registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
    Registry entry:  SMB2
    REG_DWORD: 0 = Disabled
    REG_DWORD: 1 = Enabled
    Default: 1 = Enabled
    http://support.microsoft.com/kb/2696547/en-us
    Note: Backup the registry key before you modify.
    Regards,
    George Zhao
    TechNet Community Support

  • How do you save data into an excel file while myRIO is acquiring data? I tried saving it using "Write to file" but it doesn't work for some reason.

    I am acquiring cosine wave and a pulse wave as input and I want to store their peak to peak values into an excel file. "Write to File" is not working for it. Is there any other vi which can be used for data logging?
    Thank you for your help.

    Hi Ssheoran,
    Can you provide more detail when you say that the Write to File VI doesn't work? Is there an error given? Or can you just not find the file on your computer? Keep in mind using this file in a Real-Time VI on the myRIO will save files on the myRIO. You will then have to transfer to your PC. Please view the following video as a guide for saving files and transferring them to your computer: (http://www.youtube.com/watch?v=BuREWnD6Eno). Hope this helps.
    Best Regards,
    Roel F.
    Applications Engineer
    National Instruments

  • Ghost Excel workbook opens each time I start excel and prevents formulas - tried all suggested solutions without luck

    Hi
    When I start excel and open any workbook a 'ghost' work book opens it doesn't contain cells and is just greyed out. When I am working on a document whenever I start to write a formula the ghost wbook opens and I cannot see the original document to complete
    the formula. If I open multiple workbooks I sometimes get a ghost workbook for each doc that is open - after a while I get error message to say not enough reources to do even simple tasks like save work or open a document.
    I have posted on several forums and tried all suggested solutions without luck - this is really preventing me from using excel which I need daily. Personally though I am only intermediate user I think it may have something to do with a workbook that I downloaded
    that had macros in it but I cant be sure
    Any help greatly appreciated
    Thanks
    Dave

    Hi Dave,
    First make sure have installed the latest update. Second, we can repair Office 2013 from Control Panel > Programs and Features. Third, open Excel 2013 in safe mode, if it works fine, disable some 3rd-party application add-ins.
    Could you please share a screenshot of this “ghost” workbook and upload it to OneDrive? I’ll analyze it in detail as soon as accessing it.
    If there is anything about this issue, don’t hesitate to tell me.
    Best regards,
    Greta Ge 
    TechNet Community Support
    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support
    teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.

  • I cannot open files attached to an excel spreadsheet. I am using office for mac 2011. when double clicking object I only get the picture modifier windows.

    I cannot open files attached to an excel spreadsheet. I am using office for mac 2011. when double clicking object I only get the picture modifier windows.

    Preventing Microsoft Office to open recent documents at startup in Mac OS, Please see:
    http://www.frenchguys.com/wordpress/preventing-microsoft-office-open-documents-startup-mac-os-lion/
    It seems that the solution works for most people.
    In a terminal, enter the following:
     defaults write com.microsoft.Excel NSQuitAlwaysKeepsWindows -bool false

Maybe you are looking for

  • Ichat file upload speeds really slow

    i am having issues with ichat file upload speeds. I'm sending a 1.5MB file and it's took 6+ minutes - one time it took 12 minutes! The same file sent back to me only took 40 seconds. The strange thing is it took 15 seconds to email the file, and 7 se

  • Have your say on Oracle ADF

    I've published a survey to gather information on how we can best help you become successful with Oracle ADF. Please take a few minutes to complete the survey. Details can be found on my blog http://blogs.oracle.com/grantronald/entry/your_chance_to_ch

  • SMQ1 problem

    Dear Friends, We are facing problem while clearing the queue on production server. After entering in to the SMQ1 xction, If we click on Bell icon (change view option), it gives Runtime Error : TIME_OUT. Previously it used to open. There is no problem

  • Problem with boot commands on G3 iMac

    My iMac G3 will not accept any boot commands like "C" or "CMD, ALT, P, R" etc... etc... when using the original Apple PRO keyboard. The Pro keyboard is fine and all the keys work in OS X. For the sake of it i tried another keyboard from my Power Mac

  • Actually supported features in JVM

    My phone has PersonalJava, so it should not support SWING.... but I found out a method to get it supporting it, without asking the phone vendor to release a new JVM version: I had just to copy swingall.jar from an old SDK and copy it to the phone! So