Excel Cannot Insert the Sheets into the Destination Workbook, Because It Contains Fewer Rows And
I Am Trying to Merge 12 Excel Files (Each Having Single Excel-Sheet) into Single Consolidated Excel File That Will Have 12 Excel-Sheets Using Microsoft...
I am trying to merge 12 excel files (each having single excel-sheet) into single consolidated excel file that will have 12 excel-sheets using Microsoft.Office.Interop.Excel liabrary and following error:
"Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use the Copy and Paste commands to insert it into the sheets of another workbook."
I think its related to Microsoft Excel Application's DCOM objects permissions issue.
Can any one explains which type of permission are required to get the services of Microsoft Excel Application using DCOM Object.
Thanks.
1 Answer
I had this problem in Excel 2013. There was a setting in options, under Save, that created new workbooks as Excel 97-2003 workbooks. I changed this to Excel Workbook and the command started working.