01-09-2025 09:53 AM
Hi! I would like to create an xy diagram in an excel file from labview. I have excel files filled with measurement results and I want to plot them inside the excel file. The ideal VI would look like this: inputs: excel file path and name , which two column is needed for the diagram (x and y), which row and column the diagram should be generated. output: in the background the diagram is generated. I've found similar topics but all of the solutions were about creating and inserting a picture of a diagram instead of a live plot. Is it possible? Thanks!
Solved! Go to Solution.
01-09-2025 10:18 AM
Help > Find Examples... Toolkits and Modules > Report Gen for MS Office > Excel Reports > Excel Report - XY Graph Generation.vi
Since your data is already in an Excel file you need to use Read Delimited Spreadsheet.vi in the File I/O palette to pull out the raw data from that. You may need to use some array functions to get just the number columns you want to plot. It depends on how your raw data Excel file is formatted but it should be easy with basic array subset, etc.
01-09-2025 10:23 AM
You can't write data to excel while you have the file open.
A better option if you just want to see what's going on would be to have a chart on the front panel of your VI, and then also have it create one in the excel file so that you can snapshot when you open it. But you can't be writing to an excel file whilst you have it open to view it.
01-09-2025 10:50 AM
I do not have the file opened. I just have an excel file and want to create a diagram from labview. This process will be the first time I open it
01-09-2025 10:50 AM
This method also creates a picture, not a live diagram
01-09-2025 10:52 AM
Can you try and be clear about what you mean by a live diagram? Do you want the diagram to be updating whilst you are still collecting data?
01-09-2025 12:18 PM
I suggest using the XLR8 add-on, as it can directly open and operate on .XLSX files.
And it does not require Excel or DirectX to be installed on the target machine
01-09-2025 04:31 PM
Help us to help you. You can start by attaching a VI that shows some of your effort to accomplish your task. Among other things, it would tell us:
A decade ago, I submitted a "Revised Generate Excel Report Example" (search for a title close to this name on the Search bar of this Forum). It should run, even though some of the RGT Function names have changed ("New Report" is now called "Create Report"). This example does not address reading Excel, but it does show you how to locate data and plot it on an Excel Worksheet.
For more help, attach your VI (best!) or provide answers to the points above, and provide more details on "what you know" and "what you want to do".
Bob Schor
01-10-2025 06:12 AM
I have the values in columns and I want to create a graph like this progmatically from labview
01-10-2025 06:16 AM - edited 01-10-2025 06:17 AM
what VI should I attach? I asked if this even possible or not.
Why the Labview version is matter? I would use any version if this possible or not.
Yes an Excel file is a "real Excel Workbook"
I attach a picture what I would like to create, creating a graph in Labview with values from a xlsx file is not my goal.