When a user creates a Print format item with Format Type = Field the column AD_Column_id can be filled, when the user saves the record and then changes the item to a different format type, the column is hidden but never cleaned-up. When the excel exported gets to this cases, it exports the value of the column, which is wrong as the print format item was modified to not show it.
The attached patch does:
1. Sets the ad_column_id to null when saving print format item if the column field is not shown any more
2. Print excel exporter checks the AD_Column_ID value only when the item type requests one