Merge cells in xlsx file using MiniExcel

226 Views Asked by At

I have an application in which I am allowing the user to download a .xlsx with some data. To build this .xlsx file I am using the library MiniExcel. The code for that looks like this.

        var memoryStream = new MemoryStream();
        memoryStream.SaveAs(GetSheets());
        memoryStream.Seek(0, SeekOrigin.Begin);

        return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
        {
            FileDownloadName = "filename.xlsx"
        };

The issue is that i would like to implement vertical merging of cells that have the same values. MiniExcel does seem to support this as seen in the link below. My issue with it seems to be that the method requires a path, however, I want to modify the memoryStream before the user downloads the file. Does anyone know if there is a way to solve this issue? https://github.com/mini-software/MiniExcel#12-merge-same-cells-vertically

0

There are 0 best solutions below