Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Send to Excel error: System.ArgumentOutOfRangeException in NAV RTC 2009

Posted on by 329

RTC crashes on multiple computers when Send to Excel function is used on one pages. All other areas/pages work well and there are no errors or crashes. Also, this does not happen with Classic, only RTC and only one page. We have restarted all servers, synchronized logins, compiled, created new entries in order to rule out data error but no success.

The event log message says: index is not in a valid range for this collection. Parameter name: Index

Here are some of the details from the event log:

Type: System.ArgumentOutOfRangeException

Message:

Index is not in a valid range for this collection.

Parameter name: index

StackTrace:

at Microsoft.Dynamics.Nav.Client.ExceptionHandler.<>c__DisplayClass2.<DoRethrowWithCatchException>b__0()

at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute)

at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute)

at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoRethrowWithCatchException(Exception exception)

Source: Microsoft.Dynamics.Nav.Client

----------------------------------

Thanks in advance for any tips and suggestions!

*This post is locked for comments

  • Neville Foyn Profile Picture
    Neville Foyn 4,320 on at
    RE: Send to Excel error: System.ArgumentOutOfRangeException in NAV RTC 2009

    Glad you got it sorted

  • Verified answer
    airikas Profile Picture
    airikas 329 on at
    RE: Send to Excel error: System.ArgumentOutOfRangeException in NAV RTC 2009

    Thanks Nev! I found out what the issue was in this case. The problem is with the page design and programming. There are two sections and Excel is not able to create a tab for the bottom section - list exports well but not the remaining part of the page. Basically, this would require additional code change in order to fix.

  • Suggested answer
    Neville Foyn Profile Picture
    Neville Foyn 4,320 on at
    RE: Send to Excel error: System.ArgumentOutOfRangeException in NAV RTC 2009

    Hi

    That error mean that the NAV page is trying to pass something to excel that doesn't fit, the index leads me to think that this might be the number of lines or number of columns (It wont be the columns unless there is a crazy number of columns?), try and set a filter so that you have only 10 lines on the page then export and see if you get the error, the new version of Excel (2010 and up i think) can handle a million lines and the old (prior versions) can handle 65 000 lines

    Cheers

    Nev

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans