11-22-2013 09:39 AM
Hi,
I know writing to excel with Labview is well documented, however I didn't find anything to my specific issue.
The ultimate goal is to have a central computer with and open .xls file (in excel) show realtime (or close to) data updates from multiple sources. I was originally thinking to acomplish this with a 'shared workbook' in excel which allows simultaneus updates from multiple users. That way, each of 10 remote PC's could all save the file, and I would set the shared workgroup update rate to 5 mins or so thus giving me near realtime data updates.
I'm not sure the best way to do this, I'm not confident the activex method would work in this case.
The excel file in question must be an .xls because it was some functions that we have to keep that break in csv/text format.
The only other method I could think of is for each pc to save updated values to its own .csv file on the central computer then write a vba script to periodically update data from there
Any suggestions?
11-22-2013 12:29 PM
Hi, I think you are going to have trouble using excel for this. When Excel is open it will not notice if you have updated the data in the file.
You will have to force Excel to refresh and reread the file, this will not be elegant. You are likely to have file locking issues. Had you considered using a Labview frontend to monitor the data, refreshing every 5 mins and then have the other Labview apps updating the data. Another option you could use database connectivity, this naturally gives the ability to update the data from multiple sources, then you could display with Excel using ODBC connectivity into the database. I should warn you that ODBC can be very difficult to get working although when its running its generally OK.
Steve
11-26-2013 09:53 AM
I was imagining having file locking issues and update issues as well, which is why I was toying with the idea of a shared workbook. Using a shared workbook allows multiple users to modify ONE excel file, and you can set the update interval, i.e. 5 mins. I'm not sure if the accessing computers need to open the file in excel, though. Guess I'll have to experiment.
It sounds like I might need to go with my other option-having labview funnel data into a text/deliminated file and then script excel to update the file occasionally. Or like you mentioned use labview on the frontend to deal with handling the data. Perhaps I'll just create a labview GUI that looks identical to the standardized excel file we have to display
11-26-2013 10:01 AM
What version of Labview are you using? What version of Excel ?
I am a Labview 2011 user with Office 2007. Having just been reading the "whats new in 2013" I realised that writing to .xlsx files is now an option. It would be an interesting experiment to have Labview writing to the same file as several PCs using a shared workbook as you originally proposed.
If you do try this please post the results it could be interesting for other users.
11-26-2013 10:12 AM
I'm using labview 2012, and ideally will be able to get office 2010 for the frontend so I can try writing to .xlsx. The project is still being considered so it may not happen, but I plan to play around with a shared workbook first.
I think the question is if computer hosting the shared workbook looks for the incoming changes to be from remote excel locations, or just keeps the file unlocked so that all users to do basic inputs (i know things like charts dont work on shared workbooks) and periodically updates the data from the file to the open document.
I'll post back when I get to this, could be interesting to play around with
03-02-2016 07:02 AM
Hello,
Did you find any solution to the issue you were facing ? I am also facing same issue. Please suggest if you find anything.
03-02-2016 02:12 PM
A couple of comments.
Bob Schor