From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XP versus Vista for writing Excel files

And as suggested, try Visual Basic Express 2010 to see if it encounters a problem with the simple act of saving an Excel file.

 

 

0 Kudos
Message 11 of 16
(477 Views)

And if VBE 2010 does or does not work, what does that tell me about getting the MS Office Toolkit to work properly with Vista?

0 Kudos
Message 12 of 16
(475 Views)

Hammer3,

 

I've tried my best to recreate your environment on my end in a VM, with the following specs:

 

512 MB RAM

LabVIEW 2011

Report Generation Toolkit for Microsoft Office 2011

Microsoft Excel 2007

 

Running the example in LabVIEW called "Generate Report from Template (Excel)", it appears to load Excel correctly and populate it with data. I believe this example is fairly close to what you are trying to do on your end, although let me know if it isn't close to what you are doing.

 

As for next steps, if you could try a few things for us, it will help us determine what the issue is that is causing Excel to act wierd:

 

1. Try running the example mentioned above, and see if it works correctly.

2. What order did you install your software/did you upgrade from a previous version of LabVIEW/Office/RGT?

3. Is there anything in my environment above that is not exactly how you are running currently?

4. Is there anything special about your environment that we should know about to further investigate this issue?

5. Did you try using VBE to do something similar, and what did that show? (If it does not work with VBE, the problem would definitely be on the Excel side, but if it does work with VBE, then its either in LabVIEW, or the RGT)

 

Thanks,

David M.
Applications Engineer
National Instruments
0 Kudos
Message 13 of 16
(452 Views)

Thank you very much for your help. The example, which runs fine on the Vista computer, does not save the Excel file using the MS Office Excel Specific save functions, which is my problem. On the computers in question, Office was originally installed, then LV 2011 with the MS Office Toolkit. I believe the computers I have here, have more RAM than you spec. I don't know anything about VBE. Attached is the vi that won't work with Vista but works fine on XP.

0 Kudos
Message 14 of 16
(444 Views)

Hammer3,

 

I've loaded your VI into my Vista VM, and I was able to run it without issue repeatedly, so it seems to me that the issue has to lie in your installation or environment somehow, and not the code or OS itself. You might try doing something similar in Excel by hand (i.e. open the spreadsheet you are writing over, make a change here or there, save, click yes if it asks about overwriting, and see if it overwrites correctly). 

 

As a workaround, if you are creating a completely new spreadsheet every time, you might try just having VI code that checks if the file you want to save to exists, if it does, delete it, and then save it. This obviously doesn't fix the issue, but would get you the same effect if that's what you wanted.

David M.
Applications Engineer
National Instruments
0 Kudos
Message 15 of 16
(420 Views)

DmcG - I appreciate your time to help with this. I can successfully write and rewrite an Excel file just using Excel on the two Vista pcs. I guess I'm at a dead end here. Fortunately I don't HAVE to use Vista pcs in my LV environment, so I'll just avoid them rather than spend a lot of time tracking this down. Again, thanks for your help. I would be interested in knowing if anyone else reading this thread has a problem with the subject vi in Vista.

0 Kudos
Message 16 of 16
(417 Views)