aVadim483 / fast-excel-writer

Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP
MIT License
142 stars 26 forks source link

How to insert image #29

Closed SyahrirMbojo closed 10 months ago

SyahrirMbojo commented 10 months ago

How to insert image in fast-excel-writer because i didn't see it in the documentation?

aVadim483 commented 10 months ago

Now there is no such feature. Might be added later

SyahrirMbojo commented 10 months ago

In my opinion, this feature should also exist because there is a possibility that the report will contain a logo image or something else. I hope the feature is available soon because I love using this library because it's simple to use but nice and fast. I need this library because I have a lot of report data that I want to export to excel. Thank you for the help.

aVadim483 commented 10 months ago

ok, i understand, i'll explore this feature

aVadim483 commented 10 months ago

I have added this in the version 4.4.0 https://github.com/aVadim483/fast-excel-writer#adding-images

SyahrirMbojo commented 10 months ago

Thank you very much and I will try it right away

SyahrirMbojo commented 10 months ago

I tried to insert an image and got an error like this

Image file "http://localhost:8081/img/img_petugas_aktif.png" does not exist

image
SyahrirMbojo commented 10 months ago

This is my code

image

i tried image with url also error does not exist

aVadim483 commented 10 months ago

Image file "http://localhost:8081/img/img_petugas_aktif.png" does not exist

Use local path to image, not URL

SyahrirMbojo commented 10 months ago

In the example above, I tried the local path and it didn't work, I got the error doesn't exist and I need an image with a URL too

aVadim483 commented 10 months ago

http://localhost:8081/img/img_petugas_aktif.png - it's a local URL, not local path on your drive the function base_url() obviously also returns a URL

SyahrirMbojo commented 10 months ago

but what I want is the URL image from our server and that is what is often needed

aVadim483 commented 10 months ago

Well, I'll add this future too (I didn't think it was necessary)

SyahrirMbojo commented 10 months ago

Thank you for the help

aVadim483 commented 10 months ago

but what I want is the URL image from our server and that is what is often needed

added in v4.4.1