11-11-2013 03:45 PM
Hello
I am using LabVIEW 10 on windows 7 Prof. 32 bit
I can read from an excel named range, which I then bring into a 2d array (as a control)
I then want to be able to alter values in this 2d array and then write back to the same named range and saved in Excel
Can anyone help please 🙂
Lee
Solved! Go to Solution.
11-11-2013 07:46 PM
It should be the same way, just do the inverse operations. Where you read a value from a range, you will write the value to the range.
Post what you have so far.
11-15-2013 07:55 AM
Thanks for your reply
I have attached my code and then excel spreadsheet from which I am reading from and would like to write back to.
The range would always be set to the number of columns and rows, it is just the data within each cell would be modified
11-15-2013 08:52 AM
11-15-2013 09:07 AM
Yes, I got them from the developers forum, else that would have been my first option. Ideally I would like a routine XLWrite .... be great 🙂
11-15-2013 09:33 AM
Look in the Read VI, and you'll see it uses an Excel Get Data, that is part of the C:\Program Files\National Instruments\LabVIEW 2012\vi.lib\addons\_office\excel.llb library.
Instead of using Excel Get Data, try using Excel Easy Table that is part of that library.
Of course you'll want to make a copy of the Read VI, and rework the code so that it writes to Excel Easy Table rather than reads from Excel Get Data.
Now all of this uses the Report Generation Toolkit. While I'm sure it works, I don't know if I would use it myself. I would use the ActiveX Excel calls directly. They are what is buried now deep in the RGT. You can find helpful links on manipulating Excel spreadsheets with Labview programming by looking through the Excel Board message thread.
11-15-2013 09:50 AM
Thank you, I will try that