for various sorting tasks I would like to achieve the following and have these questions:
how can I address in javascript the content of the last row of a given column? The number of rows should not matter.
I would like to use this to read the cell contents (a number) and feed it into a javascript formula.
How can I split a column in half in such a way that the first half remains and the second half is next to the first column as a second new column?
How can I reverse the order of the rows within a column?
I experimented with the transformation filter but could not achieve this.
Currently the Javascript transform can only work on one row at a time. We intend to address this in future with a more advanced Javascript transform. Until then there there may be another way to do what you want. Perhaps you can tell us a bit more about what you are trying to achieve.
Use the Split Col transform to split the column into 2 columns and then use the Remove Cols transform to remove the original column.
Iām not sure what you mean by āwithin a columnā. Can you give a simple example?
In Excel I create a number series, which I load into EDT and transpose it to get a column. Now I want to use a JavaScript algorhytm to generate the new number sequence.
The JS-algorythm is known to me. But it needs the specification of the total number of rows (as well as the specification to āNumber of pagesā in the Page Order Calculator. If there are 480 rows, then the number 480 should go into the JS)
I think Split Col Transform splitted the content of a cell. What I mean is to put the second half of all rows next to the first half as a separate column (like Excel-sheet column and D). https://abload.de/img/screen1-2koein.png
By this I mean to reverse the order of the cell contents within a column (like in excel sheet column F).
My goal is to bring together the first half of the column with the inverted second half of the column as shown in column H in the excel sheet.
Thanks a lot for your help!!!
Regards yosimo
(Iām missing a preview in the posting editor )
(and unfortunately I can only put two linksā¦)
You could use Filter or Slice to create 2 datasets, add a row number to these new datasets using Row Num and then Join them using the row number as a key. It depends on what you want to do with any other column values.
There is something wrong with theTransformation Replace. Maybe it has to do with the fact that you use letters in your example, but I only use numbers?
I had the transformation filter already in processing, but had let it be again, because I have to specify the value for filtering manually. This makes it unsuitable for processing that is as partially automated as possible.
I would also like to have a possibility to determine the value automatically, a filter operation like n-Rows/2.
But the subsequent transformations are interesting again.
If the column is all numbers it will compare values numerically. If the column is a mix of numbers and text it compare everything as text (alphabetically, not numerically). Perhaps that is the problem?
I downloaded the .transform file, but it isnāt much use without an input file to go with it.
You can use the count-columns.transform (above, should have called it count-rows.transform!) to count the rows, then Calculate or Javascript to calculate n - Rows/2 (being careful about rounding odd numbers!).
No, I probably havenāt gotten the composition of the transformations and their options right yet. Itās a bit time consuming to dig deeper into it.
Wow, thatās great, and thereās certainly a lot of work that went into it. It also shows that itās not so trivial after all, when it takes so many transfomations. My respect. (for me these are the first steps with EDT)
I tried now to use e.g. 1-480 from the clipboard instead of 1-20, then the first transformation with the javascript does not update. A run-button appears only in Clipboard, where I copied the data, but in the following transformations no run-button appears anymore. It still shows only the numbers 1-20.
Why is this? How do I update the transformations to the new input values?
I think @Anonymous hard coded the number of rows into their example as an extra column. See my count-columns.transform file above for how to do this dynamically.
I have auto run disabled that is why it is not running the later transform, follow the following steps
Here is with 480 numbers, there is no hard coded numbers, you can have as many numbers as you like that EDT can handle with your computer memory.
Just remember that, you should have Numbers as Header, when you copy new numbers to clipboard to be pasted in the transform for example;
Numbers
1
2
3
4
and so on
@Admin, no need for count-columns.transform. I simply used the Meta Info: Every Row with $(DataRows) in the Clipboard, so when one copy new data, you get extra column Meta Info with total number of rows automatically, which I used to calculate the half, so itās dynamic.
Ohh, I finally got it to work: I had to select all the transformations at once first and then press the run button. I didnāt know that. I thought if I changed something up front, then all subsequent transformations would update automatically.
My next step will be to implement the task with the JS algorithm.
You need to press the middle button
on the top tool bar and it runs all the transformation that need to run, donāt have to select all the transform first to run it.
I disabled auto run, because I donāt like to be interrupted after each 1 to 5 seconds (maximum auto run delay) when I am adding, updating transforms.
So simply copy your data first to clipboard and then import it into the Clipboard input as mentioned in my previous post and simply click on the Middle Play button icon on the tool bar or press the hot key as shown in the Run menu (Run Unprocessed Ctrl+R) and all the transforms will get updated.