Can c1excel Load only the first few rows of an xlsheet

  • 1p
    Paresh.Naik1p 2 years, 4 months ago

    I am working with excel files whose size is between 70-150MB. Loading a 70MB file takes around 40seconds while loading the 150MB file takes 80 seconds.

    I want to read some content from the first few lines of the sheet.

    I do not want the user to wait for 80 seconds, and was wondering if c1 excel supports a mechanism in which only the first 10 rows can be read, without loading the full file?

  • 11p
    Reeva11p 2 years, 4 months ago

    Hello,

    There is no way to load a number of rows in C1Excel from MSExcel file. However, you can load a particular sheet with C1Excel component. Here is the code for the same:-

    // Firstly load workbook without worksheet data
    
    c1XLBook1.Load(FilePath, false);
    
    // Then load particular Excel file sheet
    
    c1XLBook1.Sheets[1].Load(FilePath, true);

    Hope it helps.

    Thanks,
    Reeva Dhingra

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.