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

Need to merge column data while Exporting Data from WinForms app to Excel

Thread ID:

Created:

Updated:

Platform:

Replies:

132392 Aug 30,2017 07:33 AM UTC Sep 6,2017 12:20 PM UTC WinForms 3
loading
Tags: XlsIO
Dhairya Joshi
Asked On August 30, 2017 07:33 AM UTC

Hello Guys,

Here I need to know is there any way I can perform merging of cells during exporting Data from DataTable to Excel File.
I know how to export it but I want to get the results in very specific way.
Please check the following screen shot :


This is what my actual data looks like if i export it to excel using Syncfusion tools.

But what it want to do is as follow :

So as you can see I've merge those records manually but  I want to merge certain columns by the InvoiceID.
Is there any way we can do it pragramatically while exporting data to excel?

Thank You.

Sridhar Sukumar [Syncfusion]
Replied On August 31, 2017 04:14 PM UTC

Hi Dhairya, 
 
Thank you for contacting Syncfusion support. 
 
Your requirement cannot be achieved while importing data table to Excel in XlsIO. However, you can achieve your requirement by workaround in XlsIO. We have shared you a simple sample which can be downloaded from the following link 
 
Sample link: 
 
Please let us know if you have any concern. 
 
Regards, 
Sridhar. 


Dhairya Joshi
Replied On September 5, 2017 04:17 AM UTC

Hello Sridhar Sukumar,

Sorry for late reply and the code did you gave me did worked, but there is a little bug in it.

If any invoice is have more then 3 items then it does not merge it.

For example if any invoice is having 4 items then 4th item will be displayed as new row rather then merging it with existing list.

Please check the following screen shot for better understanding, the code is same as you gave but id made DLL for same so that i can use it anywhere.

And following is the Windows Class Library Project code :

Please do let me know what i can change to make it correct and as always thank you so much for this help as well ! :)


Sridhar Sukumar [Syncfusion]
Replied On September 6, 2017 12:20 PM UTC

Hi Dhairya,  
  
Thank you for updating us. 
  
We have modified the sample to achieve your requirement and the sample can be downloaded from the following link. 
  
Sample link:  
  
Please let us know if you have any concern.  
  
Regards,  
Sridhar. 


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.

Warning Icon 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.Close Icon

;