05-18-2018 08:11 AM
Hallo Forum,
Gibt es eine möglichkeit in einer 2DTabelle im Report z.B. 2 Zellen zu verbinden, also per Script?
(Wie in excel 2 nebeneiandner liegende Zeilen verbinden zu einer)
mfg
05-18-2018 11:58 AM
Sie können viele gleichmäßig beabstandete Werte zwischen den beiden Punkten einfügen, indem Sie eine for-Schleife verwenden. Vielleicht ein konkretes Beispiel geben? (Ich habe Google Translate verwendet, damit die Kommunikation nicht 100% ist)
you can insert many evenly spaced values in between the two points using a for loop. Maybe provide a specific example? (I used google translate so communication is not 100% here)
05-18-2018 01:29 PM
Thank you for the response.
Okay for example i want a 2DTable with 2 columns and 20 rows. Is it possible that i can concet (at any row 1-20) 2 cells to one single cell?
In the report i cant conect the cells thats why i looking for a script command.
i have uploaded one screenshot for your better understanding.
05-18-2018 02:18 PM
Really hastily put but a good start point
Option Explicit 'Forces the explicit declaration of all the variables in a script. DIM DELIMITER: DELIMITER = " - " Dim chn1, chn2, resChn, i Set chn1 = Data.Root.ChannelGroups(1).Channels(1) Set chn2 = Data.Root.ChannelGroups(1).Channels(2) Set resChn = Data.Root.ChannelGroups(1).Channels.Add("result", DataTypeChnString) For i = 1 To chn1.Size Step 1 resChn.Values(i) = chn1.Values(i) & DELIMITER & chn2.Values(i) Next
Assume your column 1 and 2 are in group 1 and are the first and second channels in that group. Can definitely be developed into a more modular function
05-18-2018 06:19 PM
I dont think you got me right. I dont want to add up(calculate) columns together or something like that. My Problem is more trivial i want just put 2 cells together. So i can write in one cell out of 2 cells summarized. excusme me for my bad explain and english.
Thank you for your help so far.
05-20-2018 09:32 PM
When running the code above on a file that is exactly like your example picture (file attached), I get a result group as shown in picture (attached). Change the value of DELIMITER to change the way the columns a joined. Try running the code on Example File.tdms to see