[問題] perl 如何建立 excel workbook

作者: gecer (gecer)   2016-02-01 23:06:06
小弟我試寫了下列一段code
use strict;
use warnings;
use Excel::Writer::XLSX;
my $path="D:\cell_b.xlsx";
my $workbook = Excel::Writer::XLSX->new($path);
my $worksheet = $workbook->add_worksheet("New_Sheet");
$worksheet->write(0,0,"haha");
my $workbook = Excel::Writer::XLSX->new($path); 這一行無法執行
但是若改成 my $path="cell_b.xlsx"; 卻可以 請問perl excel module
無法指定新workbook的路徑嗎?
作者: MistQ   2016-02-02 02:28:00
"D:\\cell_b.xlsx" or 'D:\cell_b.xlsx'參考 http://www.perlmonks.org/?node_id=401006http://perldoc.perl.org/perlop.html#Quote-Like-Operator單引號是純字串,雙引號可以有變數跟跳脫字元

Links booklink

Contact Us: admin [ a t ] ucptt.com