How to edit Excel file (xlsx) using linux shell
My idea is a python script like this:
import pandas as pd
filename=argv[1]
df = pd.read_excel(filename,sheet_name="Sheet1").ix[:-3] ## read the xlsx without last 3 rows to a dataframe
df.write_excel("output_sheet.xlsx") #write dataframe to xlsx file
to check "non-emptiness" you can use df.notna()