Hi,
I’ve made a file that contains links to the calc file. Once opened, the links update.
There are 7 tables in the writer file, each containing 100 rows.
If the data in the calc file is less than 100, the remaining rows are blank after the update.
I need a macro that will remove empty rows from each table. Could be on button.
I never wrote macros. I do not know this language. Can I count on your help?
I can delete rows from each table myself. But the file is intended for use by my dad, and it is difficult for him.
optionally, it would be great if someone had a macro to remove links from external files. Because before you delete the rows it is necessary.
EDIT:
I found samething:
Sub removeEmptyRows)
oTables = ThisComponent.TextTables
For i = 0 To oTables.getCount() - 1
nr = oTables(i).getRows().Count
for n = nr to 1 step -1
if oTables(i).getCellByName(A & n).getString() = "" then oTables(i).getRows().RemoveByIndex(n-1,1)
next
Next
End Sub
Everything works, but it works always when column A is empty. What I want is delete when columns A and B are empty (or better - when all columns in row are empty)