07-04-2017 01:03 AM
Hi,
I want to generate new excel files from my own simple "Template.xlsx" file. (Template will have some prefixed data,graphs etc.)
The new file should have all data from template and also some more data which i will copy.
I tried it using "Copy" function but at the end i get a new file created, but all the data which is copied from Template file is lost/cleared.
can some body help in this.
07-04-2017 09:48 AM
The Report Generation Toolkit has an Excel Template input that really is a "Template", that is, whatever is in the Excel File on input is kept (unless overwritten by code that you write to "fill in the Spreadsheet") and will be saved by the Save Report to File function with whatever name you specify (including the name of the Template itself, allowing you to programmatically alter the Template).
You are using an Express VI to Write to Measurement File, which is doing I-don't-know-what behind the scenes. I have no idea if it supports "Templates" in the manner that the RGT does ...
Bob Schor
07-04-2017 11:24 PM - edited 07-04-2017 11:24 PM
Not able to VIEW Your Code (Higher Version)
Explore this You will be able to complete
07-05-2017 06:35 AM
Hi PalaniveIT,
can you please share the VI or display the label of vi's used in below image.also whats Excel._Application? your own excel template or something else?
07-05-2017 06:40 AM
Hi Bob,
I guess the Report generation toolkit asks/saves only the Graphs. I want to have some data in the Template also want to copy new data into same excel file. Means input is some numeric data.
can this be done?
07-05-2017 07:52 AM
In the Forums, if you use the Search bar and type the word "Revised " into it and look at what it returns, you'll find a Revised Excel example that doesn't talk about templates, but shows how you can use the RGT to create an Excel Spreadsheet with single entries, a table or two, and a Graph, all placed "where you want them to be". [It is designed as a Revised Example, as the one that came at that time with LabVIEW seemed a bit simplistic and incomplete -- the author has not checked the currently-shipping examples].
If you have a Template (meaning you are starting with an existing Excel file to which you will be adding new data), you (of course) need to know where to put the new stuff, but the Revised Example shows you how to specify where the data should go. Note that you can either "reuse" the Template file by specifying a different file name for the Save Report to File function or can use the Template file as an "input" file that you modify by adding new data and saving it under the same name -- it's up to you how you program it.
Bob Schor
07-05-2017 09:34 AM
Hi Sacsk,
I have shared the code snippet, which you can drag and drop in the VI BD. and Provide the Template File path and target path and try to close all the Reference it will work good for you.
just try and share the code if any issues ,we will help you out to solve.
07-05-2017 11:58 PM
@PalanivelThiruvenkadam wrote:
Hi Sacsk,
I have shared the code snippet, which you can drag and drop in the VI BD. and Provide the Template File path and target path and try to close all the Reference it will work good for you.
just try and share the code if any issues ,we will help you out to solve.
This looks very near to my application. Yes it creates/copies contents of Template.Thats fine.
but how to put new data to this newly created excel file?
Here is my code - where i was trying to copy a Template file and add some set of data.
07-06-2017 01:35 AM
Try to explore from the shared file so that you will get to know how it works
try this
07-06-2017 04:24 AM
I tried one more option and even it looks very close..
Used "excel easy table.vi" to save the data. but the data saved is stored as 2 ROWS.
But i want the data to be stored as 2 columns as shown in attached image.
Any option to convert this to 2coulmns and feed to excel?