Removing some rows from Excel after exporting data

Hello,
I have a script that do some calculations on mass buildings and export data to Excel and everything is fine. But there are some rows which i want to delete from excel after exporting. For example, in below pics it can be seen some rows have all zeros which means that corresponding level of building has no mass data. All i want is to remove those rows from excel which has all zeros.

Could you explain your intent to help me understand as to why you aren’t eliminating that data before exporting
Eliminating the lists whose tail contain all zeros should mostly work for you

Actually they are different lists/sublists and in the end i use transpose.list to form the last list which i showed in screenshot. So actually the items of the last list come from different sublists.
You said something about “Eliminating the lists whose tail contains all zeros should mostly work for you”. Can you explain more.

Sorry for late reply as i just came to office as its morning now in Germany.

My suggestion was that you eliminate the lists that have 0 at all indices other than the first.
The first item in a list being the head, the rest being the tail


tail.dyn (11.2 KB)

1 Like

Thanks @Vikram_Subbaiah. Your solutions are always to the point and easy. Indeed you are a great asset for this group and for learners like us.

1 Like