LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the excel get last row sub VI to ignore borders?

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 3
(1,234 Views)
Solution
Accepted by topic author jimmyjones321

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:

https://support.microsoft.com/en-us/office/locate-and-reset-the-last-cell-on-a-worksheet-c9e468a8-0f...

 

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. 

Andeagon_0-1658425785183.png

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.

Andeagon - LabVIEW 2015
Message 2 of 3
(1,219 Views)

thank you very much for a swift response and a helpful solution.

0 Kudos
Message 3 of 3
(1,201 Views)