06-28-2012 12:33 AM - edited 06-28-2012 12:35 AM
Hi
I have a problem in implementing this logic.I'm using Active X for writing to excel. For writing to excel worksheet, Range of cells have to be written to the "Range Invoke node " as shown in the VI below.
For Example if I have a 4x4 array.
If the Input to the Range terminal is A2: D5 , then the array will be inserted in those range of cells.
But I have a condition in which the user willl choose only the cell from which he wants to start inserting the data.He won't specify the destination cell ie., D5
Since the user can choose any cell to start from say AA,BB or ZZ.Example, If the user specifies the starting cell as AA and if the Array 2x26 has to be written from AA then the destination column will be AZ, If its 2x46 then it will be BT.
What I wand is a logic to do this. So my inputs are the starting cell name and the 2d array,output is the destination column name.
The calculation of the destination Row is simple,I can add the no of rows in the 2d array after subtracting 1 from it to the starting row number. The destination coulumn name is my concern.
It would be helpful if someone could make a sample vi with the logic.
Please take a look at thePic attached to know were i want to put this logic.If the mode of selection is manual,the user will specify both the source and Destination cell(A2&D5), If its Auto only A2
Thanks in Advance
Regards
Temin
06-28-2012 01:00 AM
I believe in the "Range Invoke node", "cell 1" requires upper-left cell and "cell 2" requires lower-right cell.
I'm not sure that's the solution.
regards.
06-28-2012 01:15 AM - edited 06-28-2012 01:21 AM
Cell 1 input has to be A1 : D4 for inserting a 4x4 array. If you write A1 to the terminal, It will write only in that particular cell.
Or else you can wire A1 to cell1 and D4 to cell 2. both does the same.
In both cases you need the destination cell name to fix the range.
Regards
Temin
06-28-2012 01:21 AM
Have you tried this?
It's what I mean.
06-28-2012 01:27 AM
ok sorry
06-28-2012 01:30 AM
In my case the destination cell name is unknown so the question is how to fix the range?
My inputs are Starting cell(A2) and the 2d array.
So it comes to a point like I should read the no of columns in the 2d array. Then develop a logic to find the destination column name(D4) so that i can fix the range for that 2d array.
Regards
Temin
06-28-2012 05:50 AM
No more answers
06-28-2012 05:56 AM
06-29-2012 05:46 AM - edited 06-29-2012 05:53 AM
.
07-02-2012 03:38 AM
I can not upload the VI, but attached images of the code:
-The cases are not shown in imagesare empty
-The VI only supports up to cell ZZ