02-07-2020 04:33 PM
Excel easy text VI takes too long to write into specified cell. It has to open existing test report and fill into specified cells. I am using Labview 2019 64 bit and 2013 office 86x. Please help me.
02-07-2020 04:46 PM
Please attach your VI. We can't really debug truncated tiny stamp sized images.
How long is "long"? (milliseconds? seconds? minutes? etc.). How big is the file? What are your timing requirements? How often do you need to update a certain cell? Do you really need to close and open the report with every operation or could you keep it open?
02-07-2020 09:28 PM
To make sure if my program was slower or not, i created another small program attached to see how it runs. This takes one minute to complete. All VIs related to report generation toolkit are slower, right from creating the file. Recently I have upgraded to 2019 LV from 2017 LV, and then installed Office 2013. Please help me know why it is taking longer.
02-08-2020 04:34 PM
I have no idea why your program runs so slowly. Of course, you refer to a few Excel files that you didn't attach, and your code is a little redundant, but if I concentrate on the task of opening Excel and doing the four writes you specify, it takes about 2 seconds, which I don't consider so bad. Here is my version of your code (as a Snippet):
Bob Schor
02-08-2020 07:30 PM
You were right. I ran your code. It took 5 seconds in my computer. I found out that my excel file that I was using caused whole program to slow down. I have attached my excel file. Please look at it and let me know why it is slowing down process.
02-08-2020 07:32 PM
You were right. I ran your code. It took 5 seconds in my computer. I found out that my excel file that I was using caused whole program to slow down. I have attached my excel file. Please look at it and let me know why it is slowing down process.
02-08-2020 09:11 PM
Thanks for including the data. I don't have a direct answer for you, but can make some "educated guesses" that are probably "more right than wrong".
Here are some facts that explain some of the "speed issues" you are seeing:
Bottom line -- NI provides a nice Tool that understands and can provide useful links into Excel. This works well when doing "simple" things, but for more complicated LabVIEW/Excel interactions, it may be slow.
One other thing I ran into a few years ago, but can't find a reference for it (and may be "mis-remembering") -- an Excel Worksheet really has a whole lot of Rows and Columns (something like 2**20 rows and 2**14 columns). I vaguely remember doing something to help LabVIEW and Excel "know" how many columns there are (LabVIEW can figure out the number of rows easily) -- maybe when using your Template, it sees it as "full width". This might be totally wrong ...
Bob Schor
02-09-2020 01:34 AM - edited 02-09-2020 01:35 AM
@Bob_Schor wrote:
Bob Schor
Or to simplify code and remove all that code duplication (actually quadruplication :)), just place the subVI in a FOR loop and autoindex on arrays of clusters. Some values can even be derived from [i]. 😄
02-09-2020 07:40 PM
Bob,
Thanks for your time. You were really helpful.