• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

50
Views
How to send Image to Excel with React

I am trying to make an export of the image in React.

My data looks-like this:

[{
        "t_pdno": "SFC093989",
        "t_mitm": "SLS005251ACL-3382012763-1",
        "t_qrdr": 60,
        "Operations": "J01 , J11 , J03 , J05 , J15 , J14",
        "path": "ACL-3382012763-1.jpg"
    },
    {
        "t_pdno": "SFC093991",
        "t_mitm": "SLS005251ACL-3382012765-1",
        "t_qrdr": 120,
        "Operations": "J01 , J03 , J15 , J14",
        "path": "ACL-3382012765-1.jpg"
    },
    {
        "t_pdno": "SFC093996",
        "t_mitm": "SLS005251ACL-3382014708-1",
        "t_qrdr": 25,
        "Operations": "J01 , J03",
        "path": "ACL-3382014708-1.jpg"
    }]

I am rendering it in my React:

enter image description here

I am using react-export-excel to export my data into Excel:

 <ExcelFile>
      <ExcelSheet data={data} name="Leaves">
        <ExcelColumn label="SFC Номер" value="t_pdno" />
        <ExcelColumn
          label="Изображение"
          value={(col) => `\\\\192.168.1.245\\Images\\${col.path}`}
        />
      </ExcelSheet>
    </ExcelFile>

The direct link I am providing is the real path to the image:

enter image description here

How I can send the image directly to be loaded in Excel? Is it possible with react-export-excel or I should use different package? I want the image to be loaded directly in Excel column.

about 1 month ago ·

Juan Pablo Isaza

Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.