Export excel with images #3161
DevilBlade-star
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to understand how to export one excel with images. I managed to do it but the images never get positioned in the row that is supose to.
So im exporting an excel of citations and each citation has a image.
When i export it the images in the excel goes to the correct coorditane but the records go allways 1 row down.
this is my code
public function collection()
{
$data = Citation::where('user_id', auth()->id())->get();
foreach($data as $citation)
{
$citations[] = array(
'title' => $citation->title,
'source' => $citation->source->name,
'description' => $citation->description,
'author' => $citation->authors,
'page_number' =>$citation->page_number,
'publisher' => $citation->publisher,
'year' => $citation->year,
'source_url' => $citation->citation_source_url,
'question' => $citation->question->name,
'topic'=> $citation->topic->name,
);
Beta Was this translation helpful? Give feedback.
All reactions