AspNet Core, xlsx export error

0 Answers 51 Views
SpreadProcessing
alex
Top achievements
Rank 2
Iron
alex asked on 26 Jan 2022, 08:51 AM | edited on 28 Jan 2022, 11:07 AM

Hi,

empty asp net core project

when trying to export a empty file (code from examples) and always get the error:

"Index and count must refer to a location within the string (Parameter 'count')" (see on screenshot)

 

(the export logic is bound to the "Privacy" route in the "Home" controller)

windows 7, visual studio 2022, telerik asp net core 2021.3.1109

project attachet

 

Tanya
Telerik team
commented on 28 Jan 2022, 01:48 PM

Hi Alex,

Looking at the stack trace, it seems like the error is related to something specific in the current culture applied to the OS. I have tested the sample project but it is properly working on my end. Can you please share the culture used on the machine you are testing the application on?

alex
Top achievements
Rank 2
Iron
commented on 28 Jan 2022, 07:40 PM

ru-RU (russia)
alex
Top achievements
Rank 2
Iron
commented on 31 Jan 2022, 07:43 AM

added more info 
alex
Top achievements
Rank 2
Iron
commented on 01 Feb 2022, 01:15 PM

anybody help? why code not working on simple tasks
Tanya
Telerik team
commented on 02 Feb 2022, 09:29 AM

Hi Alex,

I have applied the settings and verified they are the same as the ones I can see on the images. However, the logic is still working as expected on my end and I can export the file without any issues. Can you please check the .NET version you have installed? It can be easily seen by checking the value of the System.Environment.Version property.

alex
Top achievements
Rank 2
Iron
commented on 02 Feb 2022, 10:30 AM | edited

System.Environment.Version  5.0.13

 

 

 

Tanya
Telerik team
commented on 04 Feb 2022, 12:26 PM

Hi Alex,

I have just prepared a sample using the setup and code you shared in this thread - can you please download it and test it on your machine? Are you still getting an error? Can you also try to run it on a different machine to check the behavior there?

alex
Top achievements
Rank 2
Iron
commented on 04 Feb 2022, 01:28 PM

hi

download it, run, same error

 

alex
Top achievements
Rank 2
Iron
commented on 04 Feb 2022, 03:03 PM

on another computer with windows 10 this project working fine

windows 7 is not supported?

alex
Top achievements
Rank 2
Iron
commented on 05 Feb 2022, 06:16 PM

ok whatever, i used ClosedXML for my tasks, thx 
Tanya
Telerik team
commented on 07 Feb 2022, 04:15 PM

Hi Alex,

I am sorry to hear that you had to fall back to using a different library. I have just managed to reproduce the error you see and it turned out to be specific for the combination of OS version, target platform, and the current culture. Here is the public report I have opened for this error: SpreadProcessing: IndexOutOfRangeException thrown when exporting file in Russian culture under Windows 7 and target platform is .NET Standard version. We are already working on fixing that issue. Please, make sure you are following the linked item so you can receive notifications about status changes on it.

I have updated your Telerik points in appreciation for this report.

Hope this is helpful.

alex
Top achievements
Rank 2
Iron
commented on 08 Feb 2022, 05:45 AM

thx for your work, I hope no one else gets stuck on this error

No answers yet. Maybe you can help?

Tags
SpreadProcessing
Asked by
alex
Top achievements
Rank 2
Iron
Share this question
or