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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Export to excel from data table

Thread ID:





50419 Oct 11,2006 11:46 AM UTC Oct 12,2006 05:24 AM UTC WinForms 1
Tags: XlsIO
Anna Srinivasan
Asked On October 11, 2006 11:46 AM UTC

I want to export data to excel from data table and also I would like to know if the he data table contains for example 100 rows, first 30 rows should display to one page remaining 70 rows should display to another page. Basically How do I use page breaker in the excel sheet object. Kindly give me sample to see the same.


Melba Winshia [Syncfusion]
Replied On October 12, 2006 05:24 AM UTC

Hi Anna,

1) Use the following code snippets to export data to excel from data table.


//Import data table

2) Here is the sample for your reference to set first 30 rows in one sheet and remaining 70 rows in other sheet.


3) Use the following code snippets to set page breaker in Excel object.

// Giving Horizontal pagebreaks
sheet.HPageBreaks.Add( sheet.Range[ "A5" ] );

// Giving Vertical pagebreaks
sheet.VPageBreaks.Add( sheet.Range[ "B5" ] );

Here is the sample for your reference:


Please take a look and let me know if you have any other questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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