12-03-2009 02:08 PM
I have a LV graph with ten plots on it.
Need to just save it to Excel.
Many attempts and problems.
Is this even possible without sending all data to Excel table, then linking to graph in same workbook?
Solved! Go to Solution.
12-03-2009 02:59 PM
Do you just want to save an image of the graph to your Excel file? Or do you want to save your data arrays which form the graph, as well?
If all you need is an image of your graph, use the "Export Image" method. Right-click on the terminal for your graph. Select "Create..." Choose "Invoke node". Choose "Export Image". The method will appear on your block diagram. Specify the file type (i.e. BMP), where you'd like to export the image (probably easiest to export to the clipboard), and then use the appropriate Excel method to paste the image from the clipboard into the Excel file.
If you need the data as well, then you'll have to write the data directly to the Excel file.
Hope this is kind of helpful.
d
12-03-2009 03:55 PM
You could also select "Export simplified Image..." from the context menu of the graph on the front panel.
If you want to store the data, try out the Express VI "write to measurement file" on the express VIs subpalette "Output". Write as text file. The file should open without problems in Excell.
12-03-2009 04:59 PM
12-03-2009 11:58 PM
03-28-2011 09:58 AM
The text file is not opening in excel...its tab delimited..even then... What to do?? Any suggestion will be very helpful...its needed in my project.. thanx
03-29-2011 11:26 AM
Hi Preetisar,
I am not sure which LabVIEW function you are using to create the .txt file, but in order to help you further, I will assume you are using the "Write to Spreadsheet Function" and writing an array of numbers to the .txt file.
I created a simple VI that simply reads in a 2D array of numbers and writes it to a .txt file.
I then opened Excel and opened the .txt file from there.
It came up with a Text Import Wizard with Delimited chosen as the file type and your data showing up in the preview. Click Next.
Step 2 will let you set your delimiters. I selected the "Tab" box and clicked next.
The final step is to pick the column data format. I selected "General" and clicked Finish.
After that, all my data was imported into Excel. From there, you can save the Excel file as a new name with a file extention of .xls if you want.
I hope this helps!
Kim W.
03-30-2011 06:13 AM
Hey Kim...
that was really good.... 🙂 thanx....
I had used write to measurement file.. and that worked too
But the problem with both(write to measurement file and write to spreadsheet) is that I am not able to get the x-axis values(time coodinates). How can i get the x values and the corresponding y values together in the same table??
Thanx...
Preeti
03-30-2011 10:49 AM
The problem is not with either Write to Measurement File or Write to Spreadsheet File but probably on how you are using them. If you do not include them in the data you pass to the functions, they will not be there to read. You really need to show how you are using either write function. Once the write is correct, you should not have any problem doing a read.
03-30-2011 02:16 PM
->But the problem with both(write to measurement file and write to spreadsheet) is that I am not able to get the x-axis values(time coodinates).
->How can i get the x values and the corresponding y values together in the same table??
Probably because the Waveform Graph doesn't have an array of x values corresponding to the y yalues, just X0 and dX. The attached shows a simple way of generating the x values from a waveform graph,and writing them and the associated y values to a spreadsheet file. If your waveform graph is a 2d array rather than a cluster, X0 and dX default to zero and one.