Declined
Last Updated: 20 Sep 2021 11:54 by ADMIN
Georges
Created on: 18 Oct 2020 04:56
Category: SpreadProcessing
Type: Bug Report
0
A file created with Excel and edited with RadSpreadProcessing can't be displayed in a RadSpreadsheet control

I open an xlsx file thant i create with Excel and edit it with RadSpreadProcessing.

But then I can't display it in a RadSpreadsheet control. An error is displayed during execution on localhost.

Here is the error message:

Exception non gérée à la ligne 48298, colonne 17 dans http://localhost:53844/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:fr-CA:bc17b1ef-7a1b-49cb-a795-5f1c64597a53:ea597d4b:b25378d2;Telerik.Web.UI:fr-CA:b87b3d5b-f055-4852-bdaf-fef1991116e3:16e4e7cd:f7645509:22a6274a:33715776:8674cba1:7c926187:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:24ee1bba:6d43f6d9:e330518b:1e771326:8e6f0d33:864068a5:6a6d718d:58366029:874f8ea2:4cd1fec6:71188da4:487c8be1:670fdf23:d944e0f6:c442ac3f:ec7335e:2e4adfe5:b4bec146:77613e24:69667591:a4c22f0d:e0037459:2f872eeb:75e7b247:b9057478:e8e3832e:728f182a:c4143936:5f88c545:6ed7f76e:32b48b51:935ec1c6:f0c58c30:16dc2978:1611ddf4:1bfaef2a:26e91122:c128760b:a7e79140:185812c5:f46195d3:6b3f73b3:2003d0b8:aa288e2d:b092aa46:a44b89c4:c8618e41:e4f8f289:1a73651d:16d8629e:2bef5fcc:a9b7ace7:e085fe68:52af31a4:5fa37e7e

0x800a139e - Erreur d’exécution JavaScript: Expected op «,» but found punc «;» (input: IF(D8<>0;E8/D8;0))

If a workbook was created with Excel, an error prevents it from being opened programmatically in a RadSpreadsheet control. Although it can be displayed there using the open button of the RadSpreadsheet. This error does not occur if you copy the contents of this workbook into the RadSpreadsheet and then save it with the save button on the RadSpreadsheet.

Thank you

11 comments
ADMIN
Dimitar
Posted on: 05 Nov 2020 10:30

Hi Georges,

Thank you for sharing your feedback, and I am glad that now this works as expected. 

Do not hesitate to contact us if you have other questions.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Georges
Posted on: 04 Nov 2020 17:46

The problem was indeed culture.

But it is not always enough to change it before opening in the RadSpreadsheet.

In my case, the Excel file is first manipulated with RadSpreadsheetProcessing and another error is preventing it from opening.

I therefore advise you to mention that it is necessary to modify the culture before any use of a provider.

This is what I did and now it's okay.

Thank you

ADMIN
Dimitar
Posted on: 26 Oct 2020 13:22

Hello Georges,

Ok, I will close this thread for now. Let me know what are the results when you have the chance to test this. 

Do not hesitate to contact us if you have other questions.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Georges
Posted on: 26 Oct 2020 11:56

Hello,

I will be away for 8 days, so I will try the solution on my return.  

I think this is what happens to me because I am French Canadian and I use Excel in French.  

Thank you very much for your excellent support.  This problem wasted a lot of my time so it's a good thing to fix!

ADMIN
Dimitar
Posted on: 26 Oct 2020 10:35

Hello Georges,

I have further investigated this and seems that this is a known issue. Detailed information is available here: Expected op «,» but found punc «;» error when loading Excel file in Spreadsheet - Telerik UI for ASP.NET AJAX - KB

Let me know if you have any other questions.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Georges
Posted on: 22 Oct 2020 20:28

I keep getting an error when trying to view the Excel file in the RadSpreadsheet control, when I run the project in debug mode in Visual Studio.

But I have placed the site on the web server and then it runs fine.

So that's ok for me, but it would be nice for you to know the reason for this error in the RadSpreadsheet control.

I am attaching a picture of where the error occurs in the browser.

Thank you!

Attached Files:
ADMIN
Dimitar
Posted on: 22 Oct 2020 11:24

Hello Georges,

What can be causing this is leaving the file stream open. Could please try changing the method that edits the workbook like this: 

Public Function Generer_CDAE_Avec_RadSpreadsheetProcessing(aPath_Fichier As String) As Boolean

    Dim No_Ligne As Integer

    Dim oWorkbook As Telerik.Windows.Documents.Spreadsheet.Model.Workbook

    Dim oWorksheet As Telerik.Windows.Documents.Spreadsheet.Model.Worksheet

    Dim formatProvider As Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider

    formatProvider = New Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider

    Using oFileStream As New FileStream(aPath_Fichier, FileMode.Open)
        oWorkbook = formatProvider.Import(oFileStream)
    End Using

    oWorksheet = oWorkbook.Worksheets(0)

    No_Ligne = 4

    For Idx = 1 To 8
        No_Ligne += 1

        oWorksheet.Cells(No_Ligne, 0).SetValue("Employee #" & Idx)
        oWorksheet.Cells(No_Ligne, 1).SetValue(Idx)
    Next

    Using newFile As New FileStream(aPath_Fichier, FileMode.OpenOrCreate)
        formatProvider.Export(oWorkbook, newFile)
    End Using

    Return True

End Function

In both cases, there is no issue on my side (see attached).

Let me know how this works on your side.

Regards,
Dimitar
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Attached Files:
Georges
Posted on: 22 Oct 2020 04:33

Good evening Dimitar,

Here is a project that reproduces the problem.

Processing is performed smoothly on a file that was created with the RadSpreadsheet.

But the same processing, done on a file edited by Excel works for editing, but an error occurs while trying to display in the RadSpreadsheet.

I placed a button for each case.

I execute the project with Visual Studio, on localhost.

Thank you

Attached Files:
ADMIN
Dimitar
Posted on: 21 Oct 2020 12:08

Hello Georges,

I have examined the code and the errors but I cannot find anything that can give me a clue what is causing this behavior. This is why I want to kindly ask you to send me your project or a sample project that reproduces this issue. This will allow me to examine it and see if I can pinpoint the reason for this issue. Since this is a public thread that anyone can see, it would be better to open a new support ticket and attach the project there.

Meanwhile, you can try to export the document without making any changes and see if it is correctly opened in Excel. This will indicate if indeed the issue is in the SpredProcessing library.

Thank you in advance for your patience and cooperation. 

Regards,
Dimitar
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Georges
Posted on: 19 Oct 2020 22:25

Good evening,

Thanks for the quick response.

I'm not a web specialist so I do as much as possible on the server side.

I managed to view my workbook using your sample client at:

https://www.telerik.com/support/code-library/spreadsheet-client-side-import-file-from-server-and-save-client -side-exported-file-on-server.

It is working.  But however, the file has errors when trying to save it to disk and open it with Excel

But I would like to know if we can simply display with the Provider a workbook that we have modified with RadSpreadProcessing.

Attached Files:
ADMIN
Dimitar
Posted on: 19 Oct 2020 08:58

Hello Georges,

Can you send me the file that you have created (some sample data perhaps)? In addition, can you send me the code that you are using to edit the document with RadSpreadProcessing?

Thank you in advance for your patience and cooperation. 

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.