07-04-2015 06:00 PM
Hi everyone, I'm trying to use Easy text report, to create an Excel file, I want to print a table, someone can explain how to do it?
Solved! Go to Solution.
07-04-2015 09:19 PM
If you have the Report Generation Toolkit (which is standard in LabVIEW 2014), you'll need to read the Help on four functions (found on the Report Generation Palette: New Report, Append Table to Report, Save Report to File, and Dispose Report. You should be able to save your 2D table to the Excel file of your choice.
Bob Schor
07-05-2015 08:37 AM
Yes, but I was trying to connect them ( table and easy text report) and don't let me do it, I don't know why if both are strings.
07-05-2015 09:23 AM
I looked again at your original post, and noticed that you are using an Express VI (Build Table2) that I do not recognize and cannot locate on my Function Palette. You also included only a picture, instead of an actual VI (or a piece of a VI, a "snippet") that I could open in LabVIEW and examine for myself. In particular, I can't tell what is in the thick red wire from Table to Registro General -- I assumed that it was simply a 2D array of strings.
Here is code that will take a 2D array of strings and output it as a 2D table in Excel. You will notice it is exactly as I described in my previous post.
Incidentally, this is a Snippet. If you have LabVIEW 2014, open a new VI, go to the Block Diagram, then drag the image, above, to the Block Diagram where, by NI Magic, it will turn into LabVIEW code that you can run. Save (and name) the VI, then run it -- it will make Demo Report.xlsx in the same folder you used to save the VI and it will contain the contents of the 3-by-4 table shown above.
Bob Schor
07-05-2015 05:18 PM
Hi , I was trying to do that but I got an error,and I have LABView 2014 32bits 😕 This is my program.
07-05-2015 06:36 PM
Here is the code that you used:
You take your 2D array of strings (which I assume you want to write as a 2D table in Excel), change it to a single string, then wire it to a Function from the Report Generation Toolkit that is completely inappropriate (as you can see if you read its Help).
I showed you exactly how to take a 2D array of strings (I used a constant array, assuming you would know to substitute the data going to Registro General in its place). There are 4 Report Generation Toolkit functions in my code, none being the Easy Text Report function that you used.
The point of my providing the Snippet for you was so you could try it, decide for yourself if it worked for you, and then put it in your code. You chose not to do so, and the code that you did use is 100% wrong.
I have told you how to make your program work. If you choose not to use it, and your code doesn't work, then I cannot help you any more.
Bob Schor
07-05-2015 06:43 PM - edited 07-05-2015 06:57 PM
Yes, I was trying with your advice, but I got the same result, then I was trying in this way but It doesn't works anyway 😕
Look at it.
07-05-2015 10:20 PM
I notice you did not connect the Error Line, so if there is an Error Message from the Report Generation step that might be helpful, you don't know about it (and neither do we). When you tried this, did you have anything in the Report File Path?
BS