Hi,
I want to export a chart report to excel. Right now exporting works fine. A new requirement is to edit the chart in the excel. Right now it will export a image for the chart. How can I export real chart, not image to excel?
Here is my exporting code:
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("xlsx", report, null);
string fileName = user_keyid + "_" + project_id + @"\" + Guid.NewGuid().ToString() + "." + extstr;
if (!System.IO.Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + user_keyid + "_" + project_id))
{
System.IO.Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + user_keyid + "_" + project_id);
}
var fs = new System.IO.FileStream(AppDomain.CurrentDomain.BaseDirectory + fileName, System.IO.FileMode.OpenOrCreate);
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
fs.Flush();
fs.Close();
Any help will be appreciated!
I want to export a chart report to excel. Right now exporting works fine. A new requirement is to edit the chart in the excel. Right now it will export a image for the chart. How can I export real chart, not image to excel?
Here is my exporting code:
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("xlsx", report, null);
string fileName = user_keyid + "_" + project_id + @"\" + Guid.NewGuid().ToString() + "." + extstr;
if (!System.IO.Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + user_keyid + "_" + project_id))
{
System.IO.Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + user_keyid + "_" + project_id);
}
var fs = new System.IO.FileStream(AppDomain.CurrentDomain.BaseDirectory + fileName, System.IO.FileMode.OpenOrCreate);
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
fs.Flush();
fs.Close();
Any help will be appreciated!