Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1320
Is it possible to Export UtraChart (Infragistics 11.1) to Excel without using Interop.Excel ?
posted

Is it possible to Export UtraChart (Infragistics 11.1) to Excel ?

Is it possible with WebExcelExporter ?

Is there a solution to export UtraChart to Excel without using Interop.Excel ?

Parents
No Data
Reply
  • 337
    posted

     SaveChart(objWorkBook, chtMgr_Mod_Exp, "Mgr-Charts");

    ----------

    private void SaveChart(Workbook w, Infragistics.Win.UltraWinChart.UltraChart ChartCtrl, string Sheetname)
            {
                Worksheet s = w.Worksheets.Add(Sheetname);
                System.IO.MemoryStream ms = new System.IO.MemoryStream();

                ChartCtrl.SaveTo(ms, System.Drawing.Imaging.ImageFormat.Png);

                WorksheetImage i = new WorksheetImage(System.Drawing.Image.FromStream(ms));
                //s.Rows[0].Cells[0].Value = "Blue Zone : " + dtpFromDate.DateTime.ToString("dd-MMM-yy");
                //s.Rows[1].Cells[0].Value = "Red Zone : " + dtpToDate.DateTime.ToString("dd-MMM-yy");
                i.TopLeftCornerCell = s.Rows[0].Cells[0];
                i.TopLeftCornerPosition = new PointF(0.0F, 0.0F);
                i.BottomRightCornerCell = s.Rows[22].Cells[9];
                i.BottomRightCornerPosition = new PointF(0.0F, 0.0F);
                s.Shapes.Add(i);
            }

Children
No Data