08-09-2016 03:53 PM
@aputman wrote:
@matt198717 wrote:Path to template is correct because the template file loads. Its only when i try to write to file through the excel easy text that i get the error.
How do you know the template file loads? Does it open up on screen or are you doing error checks? If not, don't assume that because the error pops up during the write process that the error occurred there....that it didn't occur somewhere prior to writing and was simply passed there thru wires.
I did debug the error and it occurs at the easy excel text. There is no error in the open template function and the tamplate does open.
08-09-2016 04:10 PM
Matt,
Sorry I can't see the code, as I could test it and see if I can get it to work. I've use the RGT to read and write Excel extensively, and have not had (many) problems.
You say that the error occurs "on the first iteration". If you don't want to show us the code, can you at least describe what you are doing? What is "an iteration"? [A list of the RGT functions in the context of your program would be helpful -- "I open Excel using a Template file, move to WorkSheet #2, write a table with header, switch to WorkSheet #1, and in a For Loop, write 2D arrays of data in a column, one array below the next. I then Save the File and ... the program crashes when run as an executable. However, if I run it in Development mode, the file gets written and looks OK". [Something like that would be a lot of help].
I think I might have an idea for you to try, but it depends on what you are doing. Please tell us more ...
Bob Schor
08-09-2016 04:15 PM
@matt198717 wrote:
@aputman wrote:
@matt198717 wrote:Path to template is correct because the template file loads. Its only when i try to write to file through the excel easy text that i get the error.
How do you know the template file loads? Does it open up on screen or are you doing error checks? If not, don't assume that because the error pops up during the write process that the error occurred there....that it didn't occur somewhere prior to writing and was simply passed there thru wires.
I did debug the error and it occurs at the easy excel text. There is no error in the open template function and the tamplate does open.
OK...just making sure. A couple of other things to try:
08-09-2016 04:15 PM
Hi Bob,
I dont mind sharing the code, but id have to alter a good portion of the code because it is talking to external devices, but i can if we cant seem to figure it out. Attached is where the error occurs at the easy excel text. Now i actually just tested a simple create and write to excel stand alone and it actually worked. So i dont think version incompatability is the problem.
08-09-2016 04:16 PM
there are merged cells and i was writing close to them. I will check that.
08-09-2016 04:40 PM
So some suggestions and questions, questions first:
Now that I think about it, I wonder if your problem is using Easy Text instead of Easy Table. Of course, I don't (yet) know what you are trying to write (i.e. what the data look like, and what the Excel Worksheet should have, e.g. "12 rows of 3 columns, starting in Cell D6".
Anyway, my suggestion was really about Excel Easy Table, and using the Start and Next clusters to help you out. With Easy Table, you wire a Shift Register to Start, and put the starting Row/Column cluster as the input to your For loop, Now, if you want subsequent loop iterations to do "down" in a column, wire Next Cell Bottom Left to the other terminal of the Shift Register, while if you want to have the loops go "across the page", wire Next Cell Top Right. No need to figure out how many rows/columns you wrote, LabVIEW/Excel will do that for you.
I'll check in later, after dinner ...
Bob Schor
08-10-2016 10:54 AM
Hi Bob,
I had considered changing the easy excel text to easy table myself just for effeciency. Im only writing a small 1d array of short strings in that portion of the code and in later parts of the code i write a short string. After your suggestion i did change that portion of the code and it did fix that one problem. I write to the short strings at a later portion of the program using easy excel text and once again get the problem. I could of course change every easy excel text to easy table, but i have to convert all my string into a 2d array. This bigger question though, why is it that easy excel text works in development environment and not in stand alone?
08-10-2016 11:46 AM
Try this link to build exe: http://zone.ni.com/reference/en-XX/help/372120A-01/lvrgthelp/rgt_stand_alone_apps/
08-10-2016 12:12 PM
Hi udka,
I have included the lvclass and nireport library already and still have issues. I was getting different errors before i included those files. Good link though.
08-10-2016 12:19 PM
when you include lvclass and nireport from which folder you selected?
-can you try creating exe with RG11 and then try?