C1FlexGrid - grouped grid export to excel

Posted by: michal.chudzik on 16 February 2021, 6:53 pm EST

  • Posted 16 February 2021, 6:53 pm EST

    We need functionality to export grid to excel file. The grid has grouped rows (by currency) and when we export, then only values at summary row are displayed with empty values on children. How can we export to excel including all values (at summary level and children level)? This is how we export:

     private void SaveMine(string filename)
    
        {
    
            var ms = new System.IO.MemoryStream();
    
            // grid goes into the memory stream
    
            grdCash.Save(ms, FileFormat.Csv);
    
            ms.Position = 0; // reset the memory stream or the sheet won't load
    
    
            // memory stream goes into the book
    
            var wb = new C1XLBook { CalculationMode = CalculationMode.Auto };
    
    
            var sheet = wb.Sheets[0];
    
            sheet.LoadCsv(ms);
    
    
            // book gets saved to disk
    
            wb.Save(filename, C1.WPF.Excel.FileFormat.OpenXml);
    
        }
    
  • Posted 16 February 2021, 9:44 pm EST

    Hi Michael,

    It seems like you have created a duplicate case which has already been replied to your other case (CAS-19665-P6T7Q7).

    Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels