Jump to content
UBot Underground

Manipulating 2 tables


Recommended Posts

Hello uBot community,

 

Been having a blast learning how to use uBot.

 

Have a question on merging 2 tables...

 

What's the easiest way to accomplish the following?

 

 

(Can I use $Subtract Lists with tables somehow?)

 

 

Let's say I have 2 tables.

Both tables have 2 columns:  Fruits, Number

 

--

 

Table A:

Apples, 3

Guavas, 10

Kiwis, 4

 

--

 

Table B:

Plums, 18

Kiwis, 6

Durians, 18

 

---

 

I'd like to add the rows from Table A to Table B, only if the fruit doesn't exist in Table B.

 

So for example, the combined result would look like this:

 

New Table C:

Apples, 3

Guavas, 10

Plums, 18

Kiwis, 6

Durians, 18

 

 

I think I can figure this out using loops...

But what's the fastest way to accomplish this?

(If it weren't a table, I'd just use the Compare and Subtract List functions... )

 

Thanks for your help!

 

 

 

Link to post
Share on other sites
Save both tables to file as .csv.  Add both as add list to list (list from file).  Save list as .csv file. Table from file.

Hi,

Thanks for the response!

 

Unfortunately, doesn't work to simply add the 2 tables together in this case.

 

In Table A, there's:  Kiwis, 4.

In Table B, there's:  Kiwis, 6.

 

Because Kiwis exist in Table B, the "Kiwis, 4" from Table A shouldn't be added.

This is the part I'm trying to solve.

 

Appreciate your help!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...