07-21-2022 11:53 AM
Im incredibly new to labview started learning 2 weeks ago and i was attempting to make a VI that can take information in a while loop and add it to an excel template. My main problem currently is that I cant seem to get the get last row sub vi t ignore borders it skips past them and puts all my data beneath it. Any help is appreciate thank you
Solved! Go to Solution.
07-21-2022 01:04 PM
The Get Last Row sub VI gets the row after of the last cell with formatting. Whille searching on that topic, I ended up on Microsoft's website:
But anyway, if you press Ctrl+End on your keyboard while being in an Excel worksheet, you'll get the last formatted cell in your Excel worksheet. The sub Vi probably get the row of this cell as the last row...
You can try and use the sub VI Excel Set Cell Color and Border but I suspect its formatting capabilities don't suit the type of border you want to do. If you don't mind having a border different from the one you've provided, this could be the way.
Instead, I believe you could modify the way you apply your border in the Excel template. Instead of selecting the cells you want, you can select the column and then modify the border for the entire column without actually formating any cell aside from the first one. Doing a Ctrl+End in a new Excel with only the border formatting of column B results in B1 being the last formatted cell. This would cause the border to be applied to all the cells of the column I don't know if that would be ok with your needs.
Since you are new, I will also add that pressing Ctrl+H on your keyboard while in LabVIEW will activate the Context help window. Overing your mouse on an item will provide a short explanation of its use. You can click on detailed help in the context help window for further details on the functionnalities of the element.
07-21-2022 01:48 PM
thank you very much for a swift response and a helpful solution.