LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open & Edit an Excel File

I am using 'Write to XL' Example VI with Labview 7.0 .

I would like to be able the data on the front panel to an already existing Excel spreadsheet, without deleting the old data in the original spreadsheet. 

I have the opening an existing spreadsheet handled, but I cannot seem to write without losing the old data first.

I have attached my edited VI & the example VI [almost identical, but nonetheless...]

Thanks!
Download All
0 Kudos
Message 1 of 8
(6,512 Views)
Hello,
      There are some words missing for me to understand exactly what you want to do.  You state "I would like to be able the data...."  What is it you want to do with the data.  I'm guessing that you want to be able to ADD the data to an exising Excel file without disturbing the old data.  Is that true.  I couldn't tell from your vi's because I couldn't properly open them.  I have LabView 7.1 and I may not have all of the sub-vi's you do.  It would help if you would save your vi's into an library file with the supporting vi's included.  Then I can easily open the vi and look at it.  Try "Save with Options" and tick "Application Distribution".  It should default to a library file (llb).  Then post that. 
 
Thanks, Scott
0 Kudos
Message 2 of 8
(6,509 Views)


@Scott P wrote:
Hello,
      There are some words missing for me to understand exactly what you want to do.  You state "I would like to be able the data...."  What is it you want to do with the data.  I'm guessing that you want to be able to ADD the data to an exising Excel file without disturbing the old data.  Is that true.  I couldn't tell from your vi's because I couldn't properly open them.  I have LabView 7.1 and I may not have all of the sub-vi's you do.  It would help if you would save your vi's into an library file with the supporting vi's included.  Then I can easily open the vi and look at it.  Try "Save with Options" and tick "Application Distribution".  It should default to a library file (llb).  Then post that. 
 
Thanks, Scott




I would like to be able to ADD data on the front panel to an already existing Excel spreadsheet, without deleting the old data in the original spreadsheet. 


Sorry about that, I couldn't even make sense of it when I read it, lol. 

I will resave the Vi in the morning with the subvis attached. 

Thanks!
0 Kudos
Message 3 of 8
(6,493 Views)
?!?!?!?
0 Kudos
Message 4 of 8
(6,471 Views)
heepofajeep,

I think you are on the right track.  Instead of using the "Open New Workbook" and "Open New Worksheet.vi" VI's, I think you need to use the "Open Specific Workbook.vi" and "Open Specific Worksheet.vi" VI's,  These VI's are within the same llb as the "Open New" VI's.  This will get you started with the existing data already in the .xls, rather than an empty sheet. 

Next, you just need to set an offset in the rows and/or columns that you will be writing data to so that you don't overwrite the old data.  Within the nested For loops of your VI, the rows and columns are being set.   A simple offset of +4 on the row data would put a new set of the data directly below the existing data in the .xls file.

Hope this helps!


Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 5 of 8
(6,432 Views)
you can also check out the Excel board for a host of excel VI's that me and many others have posted. If you are still struggling with this let me know and I will help you.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 6 of 8
(6,404 Views)

hello

i wil try to open your sub vi ..but its not possible can u atachec ur sub vi files

 

0 Kudos
Message 7 of 8
(4,421 Views)
You realize that you are posting to an EIGHT year old thread?
0 Kudos
Message 8 of 8
(4,394 Views)