Automate columns without values

We need to automatically remove columns without values when generating a document.