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.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.

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest