Deleting only certain null values in a list

If anyone could help me out here I would appreciate it. So, I am trying take data from excel and make sheets with the parameter values, Drawing Number, Drawing Title, Line 2, and Line 3 (This can be seen in Excel picture below). My code works good to make the sheets with those parameters. The problem I am having is that sometimes our drawings don’t have a Line 3 name, as can be seen. I am able to get rid of nulls for the line spacing between row 17 and 18 and then I just transpose the list but it also gets rid of the nulls for the empty line 3 values which is a problem because then my list don’t match up. Does anyone know of a way where i can keep those null values in the line 3 column?

You could do an if statement to check if there is a null in a certain column, like column A. Something that there should always be a value if the row should stay. From there, anytime you find a null in that column, remove that row. It is more complicated than a single List.Clean node but should work.

1 Like

Thanks for the quick reply! Would this still allow the nulls to stay in the line 3 parameter because I don’t want to delete the rows without a line 3 parameter. I just want to make that sheet not have a line 3 parameter. Sorry if my wording is a little confusing.

Yes it will. Here is a picture, should better explain it:

It checks a certain index for nulls and removes only those lines. So it won’t affect any lines that has a null only in line 3. Alternatively you could check if all items in a list are null and remove them that way. This would look like:

1 Like

Yes! Thank you so much this is exactly what I needed!