Skip to content

When exporting a table to an image, there is a small issue with handling the style of merged row headers. #111

@shalousun

Description

@shalousun

Below is my original HTML table.

Image

Then, I use the following code to export the table to an image:

document.getElementById("download-button").addEventListener("click", function () {
    const table = document.getElementById("summary-table");
    html2canvas(table).then(function (canvas) {
      // Convert the canvas to an image and save it
      const img = canvas.toDataURL("image/png");
      const a = document.createElement('a');
      a.href = img;
      a.download = "summary-report.png"; // Set the download file name
      a.click();
    });
});

The exported image is displayed as follows:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions