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

Leave out the first row for headines and fill the rest of the excel with a given List<object> ?

Thread ID:

Created:

Updated:

Platform:

Replies:

123640 Apr 6,2016 06:25 AM UTC Apr 8,2016 09:33 AM UTC ASP.NET MVC 3
loading
Tags: XlsIO
Testname
Asked On April 6, 2016 06:25 AM UTC

Hi

how to leave out the first row for headines and fill the rest of the excel with a given List<object> by using c# ?

Abirami Varadharajan [Syncfusion]
Replied On April 7, 2016 10:03 AM UTC

Hi Testname,

Thank you contacting Syncfusion support.

You can specify first row of excel while importing the list object in ImportData method. Kindly refer below code example to achieve this.

Code Example:


            IList<Customer> customers = this.GetCustomerAsObjects();

            //ImportData(IEnumerable arrObject, int firstRow, int firstColumn, bool includeHeader)
            sheet.ImportData(customers, 5, 1, false);


We have also shared the sample for importing the list object to excel which can be downloaded from the following link. Kindly refer and let us know if it helps.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/BusinessObject2029168686.zip

To know more about importing data in XlsIO, kindly refer the following UG documentation link.

UG Documentation link: http://help.syncfusion.com/file-formats/xlsio/working-with-data#import-data-from-business-objects

Regards,
Abirami.

Testname
Replied On April 7, 2016 10:21 AM UTC

what if i have anested string array

Abirami Varadharajan [Syncfusion]
Replied On April 8, 2016 09:33 AM UTC

Hi Testname,

Thank you for updating us.

Currently, there is no direct method to importing nested array in XlsIO. As a workaround, we have created a custom method ImportNestedArray for importing a nested array to a worksheet. Kindly refer the sample which can be downloaded from the following link and let us know if it helps.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ImportNestedArray-1459708549.zip

Please let us know if you have any concerns.

Regards,
Abirami.

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

;