07-26-2013 08:49 AM
I found a good LLB for retrieving a 2D array from specific cells from a specific worksheet and used that as a template to write to excel. I just do not know how to actually get the data written down. I've looked at the WriteToSpreadsheet VI but I do not see how i can write to a specific cell group. Please advise and if there is a simplier way that would be appreciated as well.
Solved! Go to Solution.
07-26-2013 10:41 AM
Check out this link and see if it is what you need.
http://zone.ni.com/devzone/cda/epd/p/id/4523
07-26-2013 10:46 AM
i looked at that but didn't see how i could specify a starting column/row, i'm very new to LabView and it is probably easy to modify, I will spend some time on it and get back, thanks
07-26-2013 11:16 AM
Rather than "get" the active cell, you will need to "set" the active cell. In the example below, I am activating cell 1,1 which is converted to A1.
07-26-2013 11:30 AM
that looks easy enough, thanks
07-26-2013 01:51 PM
i'm going to be calling this VI from TestStand so i tried to remove the event structure and set an active sheet, i also removed the "make visible" part for excel, i cannot seem to get my data to appear at all let alone in the correct cell
07-26-2013 01:58 PM - edited 07-26-2013 01:59 PM
You retrieved the sheet specified but did not select it (or do anything with it). Your code attempted to continue on the worksheet that was selected by default. Additionally, the code you were given is EXTREMELY slow for writing an array to a range. Use both the Cell1 and Cell2 properties to get a reference to the entire range then set the value, once. The attached VI should work and be considerably faster.
07-26-2013 02:16 PM
i get this error code: -2146827284 Unknown System Error in ExportToExcel_new.vi out of the Worksheet invoke node that contains the cell range, i added a close to close the excel app (hopefully did it right)
07-26-2013 02:17 PM
Don't use 0,0. The cells start at 1,1.
07-26-2013 02:23 PM
@aputman wrote:
Don't use 0,0. The cells start at 1,1.
Good point, I presumed that either test stand was wiring in a non-zero value or the Convert Cell (that was not included) was handling that case. I also missed adding the array size to the start cell. See attached...