Problem on Exporting to Excel

  • I have a report and when i try to Export the same to Excel it gives an Error:

    Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

    The same report works fine on Exporting to PDF, HTML etc..

    Is there any setting that needs to be changed? Any inputs would be appreciated

  • Sounds like you have a report that has many many rows and exceeds the Excel limit on rows.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Jack is right....something is too big within the report...either the size of the overall spreadsheet or maybe a super large number within one of the cells....

  • Any resolution to this problem if one of the numbers is a super large number ?

  • I think excel has limit of appx. 65000 rows per sheet.

    can u check the number of rows your query is returning

    select count(*) from (Your query) as cnt

    If its beyond excel's limit, you might want to limit the number of rows to 65000 and fire it again with different limit

    select * from YourTable where id between 1 and 65000

    select * from YourTable where id between 65001 and 130000 and so on and paste the results in different sheets/files.(If that is what u want to do)



    Pradeep Singh

  • the query returns only 288 rows and still the problem exists.

  • Doesnt seem to be an excel issue.

    see if you can find some resolution from

    http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/973e3546-3f52-4d1e-b370-6af79a4c3c53/



    Pradeep Singh

  • Do you have excessively long charactes in a single cell? Excel has a limit of how many characters a cell can contain and I've had this problem before.

  • Usually when you copy a text of length>256 characters and paste it to a cell in excel, it truncates the text to the first 256 characters.

    However, if you manually enter data in a cell, you can exceed this limit.



    Pradeep Singh

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply