sri already answered your question - you cannot both render and 
redirect_to. And you have confirmed that to be the case.

On Tue, 13 Mar 2018, Caveman Pl wrote:

> Hi All,
> 
> Thank you for your help.
> 
> It works!! 
> When I remove last line from sub gatherCelMetadata... (below I have pasted 
> working gatherCelMetadata)
> I dont understand why is that.
> Maybe you can answer this question.
> 
> Thank you.
> tj
> 
> sub gatherCelMetadata{
>     my $self = shift;
>     $self->plugin('RenderFile');
>     my $workbookWrite  = Excel::Writer::XLSX->new( 'celFileMetadata.xlsx' );
>     my $worksheetWrite = $workbookWrite->add_worksheet();
>     ...
>     for my $token ( @fields ) {
>         $worksheetWrite->write( $row, $col, $token );
>     }
>     ....
>     $self->render_file(filepath => 
> '/home/test/tmp/my_app/celFileMetadata.xlsx', 'filename' => 
> 'celFileMetadata.xlsx' );
> #    $self->redirect_to('/');
> }
> 
> 

Reply via email to