나는 다음과 같은 코드가 있습니다배열 요소에서 메서드를 호출 할 수 있습니까?
Can't call method "add_series" on an undefined value
이유 : 나는 그것을 실행하면
my $workbook = Excel::Writer::XLSX->new('a_simple.xlsx');
my $worksheet = $workbook->add_worksheet();
my @chart_performance1 = $workbook->add_chart(type => 'column', embedded => 1);
my $no_of_titles = 3;
for (my $no_of = 0; $no_of < $no_of_titles; $no_of++) {
$chart_performance1[ $no_of ]->add_series(
name => $chart_heading[ 0 ],
categories => [ 'Sheet1', $array_game_titles[ $no_of ] , $row_range_max , 0, 0 ],
values => [ 'Sheet1', $array_game_titles[ $no_of ] , $row_range_max , 1, 1 ],
);
}
, 내가 오류를?
무엇이 당신 질문입니까? – ThisSuitIsBlackNot
우리는이 방식으로 모듈 함수 "add_series"를 호출 할 수 있습니다. – LohitRaj
@LohitRaj 시도했을 때 어떻게됩니까? 많은 예제가있는 문서를 읽으십시오. –