Skip to content

Pdf: Performance issue when having a table named style in the output range #2483

Description

@JanKallman

When having a table with a named style in the output range, the pdf export is slow. This is due to the ExcelTableNamedStyle.SetFromTemplate method is called multiple times instead of once per table.

    [TestMethod]
    public void ExportBlazorWorkbook()
    {
        using (var package = OpenTemplatePackage("BlazorSample1.xlsx"))
        {
            var ms = new MemoryStream();
            package.Workbook.SaveAsPdf(ms);
            var path = Path.Combine(_pdfPath, "BlazorSample1.pdf");
            File.WriteAllBytes(path, ms.ToArray());
        }
    }

BlazorSample1.xlsx

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions