Revised the consolidation code for XLS files