Only get headers from Excel file (without load whole file)

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

Only get headers from Excel file (without load whole file)

Postby calago » Thu Jul 11, 2013 1:06 pm

Hi,

Is there a way we can retreive the headers from an Excel file, without having to completely load it into a datatable? (which causes much load time for very big files).

Regards,
Calago
calago
 
Posts: 8
Joined: Thu Oct 20, 2011 9:09 am

Re: Only get headers from Excel file (without load whole fil

Postby amy.zhao » Fri Jul 12, 2013 3:05 am

Dear Calago,

Thanks for your inquiry.
Please try the code snippet as below to get headers.
Code: Select all
            // Get text and image in the left header
            string headerLeftText = worksheet.PageSetup.LeftHeader;
            Image headerLeftImage = worksheet.PageSetup.LeftHeaderImage;

            // Get text and image in the center header
            string headerCenterText = worksheet.PageSetup.CenterHeader;
            Image headerCenterImage = worksheet.PageSetup.CenterHeaderImage;
           
            // Get text and image in the right header
            string headerRightText = worksheet.PageSetup.RightHeader;
            Image headerRightImage = worksheet.PageSetup.RightHeaderImage;     

If you have other any problem, please feel free to contact us.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2273
Joined: Wed Jun 27, 2012 8:50 am

Re: Only get headers from Excel file (without load whole fil

Postby Gary.zhang » Wed Jul 17, 2013 9:57 am

Hello Calago,

Have you tried the code provided by AMY? Has the issue been resolved? Could you please update the thread if convenience?

If there are any questions, welcome to get it back to us.

Thanks,
Gary
E-iceblue support team
User avatar
Gary.zhang
 
Posts: 1390
Joined: Thu Apr 04, 2013 1:30 am


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 2 guests