|
Revision 21985, 0.6 kB
(checked in by mizuno_takaaki, 5 years ago)
|
|
lang/perl/Catalyst-View-Spreadsheet-WriteExcel?: utf16 supported
|
| Line | |
|---|
| 1 | package TestApp; |
|---|
| 2 | use strict; |
|---|
| 3 | use warnings; |
|---|
| 4 | |
|---|
| 5 | use Catalyst; |
|---|
| 6 | use utf8; |
|---|
| 7 | |
|---|
| 8 | our $VERSION = '0.01'; |
|---|
| 9 | __PACKAGE__->config({ |
|---|
| 10 | name => 'TestApp', |
|---|
| 11 | 'View::Excel' => { |
|---|
| 12 | expose_stash => 'sheet', |
|---|
| 13 | }, |
|---|
| 14 | }); |
|---|
| 15 | |
|---|
| 16 | __PACKAGE__->setup; |
|---|
| 17 | |
|---|
| 18 | sub foo : Global { |
|---|
| 19 | my ( $self, $c ) = @_; |
|---|
| 20 | my @list = ( |
|---|
| 21 | {name => 'mizuno', score => 10,}, |
|---|
| 22 | {name => 'aql', score => 130,}, |
|---|
| 23 | {name => '$B$R$G$*$-(B', score => 200, }, |
|---|
| 24 | {name => '$B$N$V$*(B', score => 70, }, |
|---|
| 25 | ); |
|---|
| 26 | $c->stash( |
|---|
| 27 | header => ['name', 'score'], |
|---|
| 28 | sheet => \@list, |
|---|
| 29 | ); |
|---|
| 30 | $c->forward('TestApp::View::Excel'); |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | 1; |
|---|