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.
Unfortunately, activation email could not send to your email. Please try again.

Remove rows on excel

Thread ID:

Created:

Updated:

Platform:

Replies:

123360 Mar 10,2016 04:11 AM Mar 15,2016 12:20 AM ASP.NET Web Forms 5
loading
Tags: XlsIO
Manolo
Asked On March 10, 2016 04:11 AM

Hi,

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))
                File.Delete(fileoutput);

            workbook.SaveAs(fileoutput);

            workbook.Close();

            excelEngine.Dispose();

But the excel saved is corrupt.

What am I doing wrong?

I attach an example project

Dilli Babu Nandha Gopal [Syncfusion]
Replied On March 11, 2016 03:48 AM

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.


Regards,

Dilli babu.


Manolo
Replied On March 11, 2016 06:43 AM

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

Dilli Babu Nandha Gopal [Syncfusion]
Replied On March 14, 2016 05:03 AM

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

 

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

Please let me know if you have any questions.

 
Regards,
Dilli babu.


Manolo
Replied On March 14, 2016 05:17 AM

Ok, Thank you

Dilli Babu Nandha Gopal [Syncfusion]
Replied On March 15, 2016 12:20 AM

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.

Regards,
Dilli babu.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;