Author Topic: Issue with exportRender Property Not Working as Expected  (Read 668 times)

cui

  • Newbie
  • *
  • Posts: 18
    • View Profile
Issue with exportRender Property Not Working as Expected
« on: January 20, 2025, 09:06:00 am »
Hi,

I'm encountering an issue with the exportRender property where it fails to function as expected. According to the documentation, I've set exportRender: true with the intention of enabling image export functionality. However, this setting does not seem to have the desired effect, and images are not being exported.
Could you please provide some guidance on how to resolve this issue?
Code: [Select]
  {
    title: '图片',
    dataIndx: 'image',
    align: 'center',
    filter: {},
    exportRender: true,
    editable: false,
    render(ui) {
      if (ui.cellData) {
        return `<img src='${ui.cellData}' style="height: 20px;"/>`
      }
    },
  },
Thank you very much for your assistance.

Best regards,
cui

cui

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Issue with exportRender Property Not Working as Expected
« Reply #1 on: January 22, 2025, 11:03:22 am »
I misunderstood the usage of exportRender. I want to know how to export the render result.

cui

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Export image based on cells
« Reply #2 on: January 22, 2025, 11:19:07 am »
Hi,

I have a table that contains images, and I want to know how to export this table to an XLSX file that includes the images.
Could you please provide some guidance on how to resolve this issue?
Code: [Select]
  {
    title: '图片',
    dataIndx: 'image',
    align: 'center',
    filter: {},
    exportRender: false,
    editable: false,
    render(ui) {
      if (ui.cellData) {
        return `<img src='${ui.cellData}' style="height: 20px;"/>`
      }
    },
  },
Thank you very much for your assistance.

Best regards,
cui

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6352
    • View Profile
Re: Issue with exportRender Property Not Working as Expected
« Reply #3 on: January 23, 2025, 08:55:26 am »
Only floating images can be exported.

Images in cells are not exportable currently; its support would be added in the upcoming versions. thanks for your feedback.

cui

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Issue with exportRender Property Not Working as Expected
« Reply #4 on: January 23, 2025, 08:59:46 am »
Okay,thank you for your response.