Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flexydial
/
hdfc-beu-v2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
90c89d9d
authored
2018-12-10 15:22:19 +0530
by
G Manojkumar
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
resolved unable to download empty campaign data
1 parent
0554d6f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
application/resources/views/layout/module/hr/mainreport.blade.php
application/resources/views/layout/module/hr/mainreport.blade.php
View file @
90c89d9
...
...
@@ -141,7 +141,6 @@ foreach($usersarr as $r => $userdata)
$ppldata
[]
=
unserialize
(
$userdata
[
'peopledata'
]);
}
// dd($ppldata);
for
(
$i
=
0
;
$i
<
count
(
$ppldata
)
;
$i
++
)
{
for
(
$j
=
0
;
$j
<
count
(
$finputarr
)
;
$j
++
)
{
...
...
@@ -171,7 +170,6 @@ if ($ppldata[$i] != false){
$headerexcel
[
$cachekey
]
=
'string'
;
//$headerexcel2[] = $cachekey => 'string';
}
}
// dd($headerexcel2);
$filename
=
"MainReport.xlsx"
;
header
(
'Content-disposition: attachment; filename="'
.
XLSXWriter
::
sanitize_filename
(
$filename
)
.
'"'
);
header
(
"Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
...
...
@@ -183,11 +181,12 @@ if ($ppldata[$i] != false){
$styles1
=
array
(
'font'
=>
'Arial'
,
'font-size'
=>
10
,
'font-style'
=>
'bold'
,
'fill'
=>
'#eee'
,
'halign'
=>
'center'
,
'border'
=>
'left,right,top,bottom'
);
$writer
->
writeSheetHeader
(
'Sheet1'
,
$headerexcel
,
$styles1
,[
'freeze_rows'
=>
1
,
'freeze_columns'
=>
1
]);
$writer
->
writeSheetRow
(
'Sheet1'
,
$selectedfields
,
$styles1
);
foreach
(
$usersdata
as
$row
)
{
$writer
->
writeSheetRow
(
'Sheet1'
,
$row
,
$row_options
=
[
'height'
=>
15
]);
}
if
(
$usersdata
!=
null
){
foreach
(
$usersdata
as
$row
)
{
$writer
->
writeSheetRow
(
'Sheet1'
,
$row
,
$row_options
=
[
'height'
=>
15
]);
}
}
$writer
->
writeToStdOut
();
return
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment