We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Remove rows on excel


I need remove de two first rows of excel. I do this:

            string filename = MapPath("operacionespendientesZeus.xlsx");
            string fileoutput = MapPath("operacionespendientesZeusModified.xlsx");
            ExcelEngine excelEngine = new ExcelEngine();
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;

            IWorkbook workbook = application.Workbooks.Open(filename);

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.DeleteRow(1, 2);

            if (File.Exists(fileoutput))




But the excel saved is corrupt.

What am I doing wrong?

I attach an example project

5 Replies

DB Dilli Babu Nandha Gopal Syncfusion Team March 11, 2016 08:48 AM UTC

Hi Manolo

We are unable to reproduce the reported issue from our side. We have shared a simple sample for your reference which can be downloaded from following link.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample1204723539.zip

We suspect that this issue might be due to the input excel file. Please share us the input excel file or issue reproducing sample (which you have forgot to attach in your previous post) along with your working Syncfusion assembly version which will be helpful for us to provide you a prompt solution at the earliest.


Dilli babu.

MA Manolo March 11, 2016 11:43 AM UTC

I'm sorry, I don't attach the example.

Can you test my project? When I save the excel, the result is an excel corrupt

Attachment: ExcelModification_50134e70.zip

DB Dilli Babu Nandha Gopal Syncfusion Team March 14, 2016 09:03 AM UTC

Hi Manolo,


We were able to reproduce the problem and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates




Please let me know if you have any questions.

Dilli babu.

MA Manolo March 14, 2016 09:17 AM UTC

Ok, Thank you

DB Dilli Babu Nandha Gopal Syncfusion Team March 15, 2016 04:20 AM UTC

Hi Manolo,

You can follow the incident regarding the reported issue in this forum and please let us know if you need any further assistance on this.

Dilli babu.

Live Chat Icon For mobile
Up arrow icon