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

Ignoring top 2 rows while reading report data??

Thread ID:





60449 May 4,2007 06:43 PM UTC May 7,2007 07:03 AM UTC ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Asked On May 4, 2007 06:43 PM UTC

I have to read ALMOST all of the data contained on a pre-existing excel spreadsheet and then place this data onto a new worksheet however I need to avoid reading the top 2 rows and I don't know how.

I'm reading data by using the following:
dataTable = sheet.ExportDataTable(sheet.UsedRange, ExcelExportDataTableOptions.ColumnNames);

This is grabbing all rows however. Is there a way I can grab all rows except for rows 1 & 2?


Melba Winshia [Syncfusion]
Replied On May 7, 2007 07:03 AM UTC

Hi Ryan,

You can use the following code snippet to avoid reading the top 2 rows:


//Read data from spreadsheet
DataTable customersTable = sheet.ExportDataTable(3, 1, sheet.UsedRange.End.Row, sheet.UsedRange.End.Column, ExcelExportDataTableOptions.ColumnNames);

Here is the sample for your reference:


Kindly 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

or the page will be automatically redirected to 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