Initialization error 'GetSheet(0)'

Posted by: david on 29 October 2024, 12:01 pm EST

    • Post Options:
    • Link

    Posted 29 October 2024, 12:01 pm EST

    Hello,

    I create a Winform projet in VS2019 with spread Version=15.0.20225.0.

    In a form I just put a SPREAD without any modification.

    If I execute the program on Windows 10 or Windows srv 2003 it’s ok. but on Windows server 2016 I have this error

    
    The index 0 is not between 0 and 0.
       à FarPoint.Win.Spread.SheetViewCollection.get_Item(Int32 index)
       à xxx.FrmMain.InitializeComponent()
       à xxx.FrmMain..ctor()


    this error comes from the line
    this.fpSpread1_Sheet1 = this.fpSpread1.GetSheet(0);
    on InitializeComponent Method…

    what’s happening ?

    thks

  • Posted 30 October 2024, 8:18 am EST

    Hi David,

    This is quite strange that you are facing the issue on Windows Server 2016 machine only. We understand that you have just dropped the control on the form, but we kindly request you share the sample application with us for further investigation.

    Additionally, please test the behavior with the latest version (V17) of the Spread as well. Here is the link to the latest installer: https://developer.mescius.com/spreadnet/download

    In case the issue persists with Spread.NET V17 also, then please share the following details:

    1. Application target framework
    2. Locale settings of your system
    3. Display setting of your system
    4. Are you working on a VM?
    5. Are you working via RDP?

    Thanks & Regards,

    Aastha

  • Posted 31 October 2024, 3:27 am EST

    Hi Aastha,

    Here the sample application

    TestSpread.zip

    At this time, I can’t migrate to V17…

    I use Microsoft Framework 4.6.2

    I work on a VM via RDP

    thanks

    David

  • Posted 4 November 2024, 5:55 am EST

    Hi David,

    Thanks for providing the sample application.

    We could replicate the issue on our end when Spread.NET v15 was not installed on the machine. However, the issue got resolved when we installed the product on our end.

    Therefore, we kindly request you install Spread.NET v15 latest version on your machine, if not already. In case it is already installed, we suggest you install it and then reinstall using the following installer link:

    https://cdn.grapecity.com/SpreadNET/installer/15.3.20225.0/Spread.NET+Installer.exe

    Hope this helps!

    Thanks & Regards,

    Aastha

  • Posted 4 November 2024, 6:27 am EST

    Hi Aastha.

    This is an operational machine and we have several of them.

    So I don’t have the licenses to install V15 on multiple operational machines.

    Also, I don’t know if the IT service will accept…

    Is the problem solved on V17?

    thks

    David

  • Posted 5 November 2024, 6:07 am EST

    Hi David,

    The issue doesn’t occur with either v15 or v17, as long as the corresponding version is installed on the machine. We tested v17 in a setup similar to yours and didn’t face any problems.

    You can download V17 latest version installer on your operational machine from the following link: https://developer.mescius.com/spreadnet/download

    Installing v17 for the first time will activate a 30-day free trial on your machine, which can be useful for testing purposes if you don’t have a v17 license.

    Thanks & Regards,

    Aastha

  • Posted 5 November 2024, 7:10 am EST

    I didn’t understand well.

    I have to install V15 or V17 on the operational machines while I don’t have a license?

    After the trial period, the programs will continue to work ?

    I won’t get the window that says the license has expired ?

    thks

    David

  • Posted 5 November 2024, 1:06 pm EST

    I found the solution to fix the problem.

    You should know that my 2016 server was in framework 4.6.

    By installing 4.8 the bug disappeared !

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels