- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有谁知道是否可以向饼图添加更多格式?例如,在图表本身上显示每个切片的百分比,还是在旁边/上显示每个切片的标签?而不是只有一个简单的传说?
谢谢!
最佳答案
Spreadsheet::WriteExcel 是不可能的但是Excel::Writer::XLSX 是可能的.
这是一个例子:
#!/usr/bin/perl
use strict;
use warnings;
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( 'chart_pie.xlsx' );
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
# Add the worksheet data that the charts will refer to.
my $headings = [ 'Category', 'Values' ];
my $data = [
[ 'Apple', 'Cherry', 'Pecan' ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $headings, $bold );
$worksheet->write( 'A2', $data );
# Create a new chart object. In this case an embedded chart.
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
# Configure the series.
$chart->add_series(
name => 'Pie sales data',
categories => [ 'Sheet1', 1, 3, 0, 0 ],
values => [ 'Sheet1', 1, 3, 1, 1 ],
data_labels => { value => 1 },
);
# Add a title.
$chart->set_title( name => 'Popular Pie Types' );
# Set an Excel chart style. Colors with white outline and shadow.
$chart->set_style( 10 );
# Insert the chart into the worksheet (with an offset).
$worksheet->insert_chart( 'C2', $chart, 25, 10 );
__END__
关于perl - Spreadsheet::WriteExcel (perl) 中饼图的更多格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6117526/
我正在尝试创建一个多表 Excel 文档,到目前为止我一直在 PHP 中完成它 - 但使用 PHPExcel 总共大约 60,000 个电子表格单元格占用了 70MB 的 RAM。 我想知道是否有人有
在我的 Perl 脚本中,我使用 Spreadsheet::WriteExcel模块创建 Excel 文件。该文件包含一个表,其大小是动态的 - 即,在创建表之前我不知道它将有多少行。我希望表格的最后
我正在尝试在 Excel 工作表中添加条件格式。不幸的是,Spreadsheet::WriteExcel 页面上的示例太简单,我不知道该怎么做。 我想通过 RC10 单元格值更改行背景颜色。在Exce
我想使用函数“autofit_columns”,如下所示:CPAN 这是到目前为止我的程序(我跳过了数据库连接和查询部分) my $workbook = Spreadsheet::WriteExcel
#! /usr/bin/env perl use warnings; use 5.012; use Spreadsheet::WriteExcel; my $workbook = Spreadshee
我正在尝试以数字格式添加欧元符号,如下所示: workbook.add_format(:num_format => "[$€-2] #,##0.00") 它的错误是: 'store_num_forma
有谁知道是否可以向饼图添加更多格式?例如,在图表本身上显示每个切片的百分比,还是在旁边/上显示每个切片的标签?而不是只有一个简单的传说? 谢谢! 最佳答案 Spreadsheet::WriteExce
我正在使用 Perl Spreadsheet::WriteExcel模块来创建 .xls 电子表格(我知道 Excel::Writer::XLSX ,但我需要保留 .xls 格式以实现向后兼容性),并
假设我有以下电子表格,我可以在 perl 中解析它,如下所示: 我想在 Column1 和 Column2 之间插入一列。所以最终结果如下所示: Spreadsheet-WriteExcel 中似乎没
长期以来,我们一直在使用 Spreadsheet::WriteExcel,它的效果非常好。 几年前我们迁移到 Excel-Writer-XLSX,它使用的内存是 WriteExcel 的 5 倍,如
作为我上一个问题的扩展,我需要将输入文件从第一行提取到空行,然后按顺序将输出粘贴到 xls 的单个单元格中。例如,“E: sda E: qwe E: ass”将打印在 A1 单元格中,NA 将打印在
我正在使用电子表格::WriteExcel。我想合并两个单元格并提供指向合并单元格内内容的超链接。 我试过这样。 $Log_Sheet->merge_range('D2:E2','Home',$Mer
我用过Spreadsheet::WriteExcel用于创建电子表格报告。 我尝试使用 merge_range() 函数合并一些单元格。 $worksheet->merge_range(3,5,9,4
我正在使用 PHPExcel 和一个 php orm 生成 excel5 电子表格,用于报告网络应用程序事务。 不得不写更多,我想知道 perl 解决方案是否会占用更少的内存并更快地生成 excel
我正在使用 Perl 包 Spreadsheet::WriteExcel编写 Excel 文件。我想将以等号“=ABC()”开头的字符串写入单元格。 $ws->write('A1', '=ABC()
使用 Spreadsheet::WriteExcel 在电子表格中创建图表时,它创建的文件不断出现错误读取 Excel found unreadable content in "Report.xls"
我已经安装了 Perl 版本 5.6.1。但不支持Date::Calc 。所以我安装了5.10.0。现在我正在编写一个程序,使用 Perl 在 Excel 中写入数据。为此,我必须使用 Spreads
我在 Spreadsheet::WriteExcel 方面遇到困难以及使用 VLOOKUP 的公式。以下测试脚本使用一些数据填充工作表并尝试创建 VLOOKUP 公式。当我打开生成的 Excel 文件
我在 MSSQL 2008 服务器的 nvarchar 列中有带有 € 符号的文本,我想通过 Spreadsheet::WriteExcel 将该文本转储到 Excel 文件中,但我总是得到一些有线注
我需要通过 Perl 脚本创建动态 Excel 公式。 我存储的公式包含虚假范围 my $stored_formula = $worksheet->store_formula('=MEDIAN(A1:
我是一名优秀的程序员,十分优秀!