Hello Progress team,
we're using the HtmlChart and RadialGauge components of your Telerik for AJAX suite and are encountering some inconsistencies between the two.
To be able to use the exportable SVGs of those components server-side, we've extended your classes and added two asp:HiddenFields each, so we can post the SVG and the dimensions back to the server for further processing. (Setting the values is handled in a button OnClientClick JavaScript function, that's irrelevant to this thread.)
As of 2019, when we first introduced the respective feature in our software, the code looked like this:
public class ExportableRadHtmlChart : RadHtmlChart, INamingContainer
{
private HiddenField _svgData = new HiddenField();
private HiddenField _svgDimensions = new HiddenField();
public ExportableRadHtmlChart()
{
_svgData.ID = "SVGData";
_svgDimensions.ID = "SVGDimensions";
}
protected override void OnInit(EventArgs e)
{
Controls.Add(_svgData);
Controls.Add(_svgDimensions);
base.OnInit(e);
}
protected override void Render(HtmlTextWriter writer)
{
writer.RenderBeginTag(HtmlTextWriterTag.Div);
base.Render(writer);
_svgData.RenderControl(writer);
_svgDimensions.RenderControl(writer);
writer.RenderEndTag();
}
}
and
public class ExportableRadRadialGauge : RadRadialGauge, INamingContainer
{
private HiddenField _svgData = new HiddenField();
private HiddenField _svgDimensions = new HiddenField();
public ExportableRadRadialGauge()
{
_svgData.ID = "SVGData";
_svgDimensions.ID = "SVGDimensions";
}
protected override void OnInit(EventArgs e)
{
Controls.Add(_svgData);
Controls.Add(_svgDimensions);
base.OnInit(e);
}
protected override void Render(HtmlTextWriter writer)
{
writer.RenderBeginTag(HtmlTextWriterTag.Div);
base.Render(writer);
_svgData.RenderControl(writer);
_svgDimensions.RenderControl(writer);
writer.RenderEndTag();
}
}
With this code, we've been running the Telerik product version 2023.1.323.45.
Now, we've updated to Telerik product version 2025.1.416.462 and are experiencing the following inconsistencies:
As I'm unsure of the "Theme name", I've put "ControlDefault". But I don't think that should matter too much. If it does, I'll try to find the correct value.
Kind regards,
Matthias
Summary
After editing an Excel `.xlsx` file using Telerik RadSpreadsheet and saving it via the default Save option, the saved file becomes corrupted. It no longer opens in RadSpreadsheet (throws an error) and shows a repair warning in Microsoft Excel.
Reproduction Steps
1. Upload an Excel `.xlsx` file to the `ABC` folder on the server.
2. Load the file in RadSpreadsheet via a basic viewer page.
3. Make any small edit (e.g., change a cell’s value).
4. Click the built-in Save option in the RadSpreadsheet toolbar.
5. Attempt to:
- Reopen the saved file in RadSpreadsheet → Error: Object reference not set to an instance of an object.
- Open in Excel → Warning: “We found a problem with some content in ‘filename’. Do you want us to try to recover as much as we can?”
Files Attached
- `Original.xlsx` — Before editing, opens fine in both RadSpreadsheet and Excel.
- `Modified.xlsx` — After saving via RadSpreadsheet, causes errors.
- Screenshot of:
- RadSpreadsheet error :
- Excel repair prompt
Code Snippet :
<telerik:RadSpreadsheet ID="sample" runat="server" Visible="false" style="font-size: 10px;" />
protected void Page_Load(object sender, EventArgs e)
{
string fileName = (string)Session["SelectedFileName"];
SheetLoad(fileName);
}
private void SheetLoad(string fileName)
{
try
{
string filePath = Server.MapPath("~/ABC/" + fileName);
if (!File.Exists(filePath))
{
string errorMsg = "File not found: " + filePath;
ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('File not found!');", true);
return;
}
// Load spreadsheet using Telerik document provider
sample.Provider = new SpreadsheetDocumentProvider(filePath);
sample.Visible = true;
}
catch (Exception ex)
{
string errorMsg = "Error opening file: " + ex.Message + " | File: " + fileName;
ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Error loading file!');", true);
}
}
**Observation:**
* This only happens for **some files**, especially ones that likely contain advanced Excel features.
* Other simpler files save and reload without any issue.
**Assumption:**
It seems the default save behavior of RadSpreadsheet is **not preserving some Excel structures**, leading to file corruption on save.
Dear Telerik Support. I found another bug related to this one below.
This line of code also causes the same issue.
$find("txtYear").clear();
See attached Console debug output.
It is my opinion that a hot fix needs to be done asap! The work around that Derek posted on May 23rd falls short of the bigger issue. This is a serious matter and needs to be addressed immediately.