Hello,
I wanted to report a bug in which I am unable to Save or generate a PDF file from this attached file after opening it in Spreadsheet component. I am getting an error HTTP 500 on my ASP.NET Core backend project's endpoints due to the error "System.FormatException: 'Input string was not in a correct format.'" in saveSettings. However, this error occurs only when I load the specific culture (for example Polish or French) to my backend ASP.NET Core project's Startup.cs file in the following way:
app.UseRequestLocalization();
I am using the Spreadsheet component v. 19.4.43 on front-end side and Syncfusion.EJ.Spreadsheet.AspNet.Core v. 19.4.0.50 on backend side.
Also, I have noticed that there is a difference in Request Payload 's (sent from front-end side) saveSettings JSONData's values depending if the culture is set on and off on backend side. When the culture is on the Duplicate ranges are separated by whitespace instead of commas (Please see the attached screenshots)
Best Regards,
Ignacy Mielniczek
Hi Ignacy,
We have checked your reported issue based on your provided excel file and it is exported properly in our end. So, before we proceed further, please share the below details.
1. Please share the JSONData that you have sent to the server in text file format.
2. Please share the sample level customization codes for both client and server.
3. If possible, please share the issue replicable sample
Could you please check the above details and get back to us with above requested details, based on that we will check and provide you a better solution.
Regards,
Sangeetha M
Hello Sangeetha,
I have attached two JSONData files which are being sent from the front-end side to the backend, depending from the culture's settings is on or off on the backend side.
Please note that the error occurs even though I am using the Spreadsheet component's default Save method on front-end side which sends a request to <url_to_document_service>/Save URL.
And here is the implementation of Save method on backend side:
[HttpPost("Save")]
[Microsoft.AspNetCore.Cors.EnableCors("MyPolicy")]
[Route("[controller]/Save")]
public IActionResult Save([FromForm] SaveSettings saveSettings)
{
return Workbook.Save(saveSettings);
}
Best Regards,
Ignacy Mielniczek
Hi Ignacy,
Based on your provided JSONData the cause of this issue is due to the conditional format ranges are splitted by space instead of comma. But in excel multiple range applied conditional formats are separated by commas, we have also provided this support for comma separated ranges. For more details, please refer the below screenshots
In JSONData
In MS Excel
Could you please share the details, how you have created this JSONData whether by loading the excel file in spreadsheet and save it as JSON? If yes, please share us the excel file or any other way please share the details, how you create this JSONData. Based on that we will check and provide you a better solution quickly.
Regards,
Sangeetha M
Hello Sangeetha,
I am sending you the exact steps to reproduce this bug:
services.Configure<RequestLocalizationOptions>(options =>
{
options.DefaultRequestCulture = new RequestCulture("pl-PL");
});
app.UseRequestLocalization();
Hi Ignacy,
We need to validate more on your reported issues. So, we will update you the further details on April 26th, 2022. We appreciate your patience until then.
Regards,
Sangeetha M
Issue 1: Exception throws while exporting the conditional formatting applied discontinues range excel file
We considered this as improvement and the fix will be available in any of our upcoming release. we appreciate your patience until then. You can track the status of this improvement using below link from our feedback portal.
Feedback Portal Link: https://www.syncfusion.com/feedback/34441/to-apply-conditional-formats-for-discontinuous-range-based-on-loaded-culture
Meanwhile, we would suggest you the workaround solution to avoid this issue by using openComplete event. In this we have replaced the space separator with comma for range value in conditional formats.
Please find the sample link below.
Sample Link: https://stackblitz.com/edit/angular-mfvr8f?file=app.component.ts
Issue 2: Background color not exported properly
We have checked your reported issue and we have confirmed this as defect and the fix will be available in our May 11th, 2022 patch release, we appreciate your patience until then. You can track the status of this defect using below link from our feedback portal,
Feedback Portal Link: https://www.syncfusion.com/feedback/34439/background-color-not-exported-properly-when-the-conditional-formatting-contains
Regards,
Sangeetha M
Hi Ignacy,
We are glad to announce that our Essential Studio 2022 Volume 1 SP release v20.1.0.55 is rolled out and is available for download under the following link. We have provided the fix for the reported issue(Background color not exported properly) in this release.
Release Notes: https://ej2.syncfusion.com/angular/documentation/release-notes/20.1.55/?type=all#spreadsheet
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Sangeetha M
Hello Sangeetha,
Thank you very much for the update. I will check and let you know soon if the issue was resolved on our side.
Best Regards,
Ignacy Mielniczek
Hi Ignacy,
Thanks for your update, take your time and we will wait to hear from you.
Regards,
Sangeetha M