Author Topic: Image processing inquiry while downloading Excel  (Read 276 times)

lhscj2466

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 8
    • View Profile
Image processing inquiry while downloading Excel
« on: March 21, 2023, 06:18:57 am »
hello.

We are currently testing the download of Excel.
I want to receive and download the image of the grid when downloading Excel.
However, it is stated that only pic is used in the past, and I cannot see a suitable example.
Please make a simple example code.
It is difficult to understand with only api because of lack of understanding of javascript and pqgrid yet.

The attached image is the screen I am currently working on, and it is processed to show the image in a specific cell.

I am trying to implement both excel upload and download in this form.

thank you
« Last Edit: March 21, 2023, 07:04:52 pm by paramvir »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Image processing inquiry while downloading Excel
« Reply #1 on: March 21, 2023, 07:23:48 pm »
Please check this example with ability to upload pictures via toolbar button to grid / spreadsheet and download the image as part of spreadsheet in xlsx format: https://paramquery.com/pro/demos/import_xlsx_tabs

Code: [Select]
                {
                    type: 'file',
                    icon: 'ui-icon-image',
                    attr: "title='Add image'",
                    style: 'margin-right:0;margin-left:1px;',
                    attrFile: 'accept=".jpg,.jpeg,.png,.gif"',
                    listener: function (evt) {                       
                        var files = evt.target.files;//doesn't work in IE9.                       
                        if (files[0]) {                                                                         
                            this.Selection().pic(files[0], 5, 5);                           
                        }
                    }
                },