09-23-2008 09:33 AM
parthabe wrote:Hi Veeru,
There is no other way other than to use ActiveX to read/write Excel files, if you do not have Report Generation toolkit.
Actually, you can use DDE, or treat the Excel file as a database and use database-related VIs, but that's another story, and not a recommended method.
09-23-2008 05:27 PM
Thanks All
Still i am not clear how to this task.
i tried Rupali answer but i didnt got it correct(i am familiar with activex).I need read all the values(Rows and columns ---upto the where the values was written)
Actually i am writing an array of values to the"write to Spreadsheet",it is saved as .xls.Now i want to read the values and plot it in the chart.
Please give me some suggestions
Thanks
09-23-2008 05:44 PM
If you are using the Write to Spreadsheet File function, then all you have to do is use the Read From Spreadsheet File since you are creating a text file - no matter what kind of extension you have. The default settings will read the entire file. The data returned is a 2D array and you can then use the Index Array function to get the rows and columns you want and plot them.
If you are struggling with this, you should post an example of one of your files, the VI you have that reads it, and a clear explanation of what data in the file you want plotted and how.
09-23-2008 06:04 PM
Thanks Dennis
I tried your suggestion,but i got a question. How to count how many rows the values were written,
I got attached the example i trying to solve.The input to the "write to spreadsheet file is 1D array(say it writes in 10 coulmns). i need to read this values in the excel file and plot all the 10 columns values in the chart
Thanks
09-23-2008 09:32 PM
Hi Veeru,
Do not use the Path to String >> Concatenate function to build the file path. The '\' may be OS dependent. just always use the Build Path primitive from the File IO palette. That way, your code will always be OS independent, I think...
Just a thought...
09-24-2008 09:23 AM
Veeru wrote:Thanks Dennis
I tried your suggestion,but i got a question. How to count how many rows the values were written,
I got attached the example i trying to solve.The input to the "write to spreadsheet file is 1D array(say it writes in 10 coulmns). i need to read this values in the excel file and plot all the 10 columns values in the chart
Thanks
First, stop saying "Excel file". You do not have an Excel file. That is something completely different. Your first question is "How to count how many rows the values were written". That's simply the size of the array that you wire to the Write To Spreadsheet File function. Surely you must have more code that what you've shown. Your next question is that you need to "read this values in the excel file and plot all the 10 columns values in the chart". Use the Read From Spreadsheet File and wire the output directly to a chart/graph.
To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.