免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3868 | 回复: 6
打印 上一主题 下一主题

如何向excel中插入图片? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-06 10:10 |只看该作者 |倒序浏览
用了这个模块Spreadsheet::WriteExcel
可以插bitmap
但是我生成的都是png图片,怎么才能插入png图呢?
或者有什么linux命令行程序可以转换png -〉bit呢?

急啊。。

论坛徽章:
0
2 [报告]
发表于 2006-08-06 17:03 |只看该作者
我没说清,我用 gd::graph  模块画出个曲线图,是png格式的,好像不能转成bmp的,所以要转一下。
不知道有什么好的方法可以使用。
Image::Imlib2我在win32下安不了,找不到ppm版本的。

论坛徽章:
0
3 [报告]
发表于 2006-08-06 20:50 |只看该作者
好像Spreadsheet::WriteExcel这个模块只能向excel插入bmp图像,它能实现其他格式的图像插入。

论坛徽章:
0
4 [报告]
发表于 2006-08-06 20:51 |只看该作者
吗?

论坛徽章:
0
5 [报告]
发表于 2006-08-06 20:54 |只看该作者
或者Spreadsheet::WriteExcel直接有什么指令可以做出折线图?我只要最简单那种xy图就行了。
我看了perldoc,有条指令add_chart_ext可以,但是不知道怎么用,而且也没有相关参考。

论坛徽章:
0
6 [报告]
发表于 2006-08-07 15:33 |只看该作者
期待...

论坛徽章:
0
7 [报告]
发表于 2006-08-07 18:25 |只看该作者

回复 huangsida 的帖子

Spreadsheet::WriteExcel can insert image BMP only ! (using method insert_bitmap).
There is no method to insert other image format, such as png, jpg, ... in this module.
The only way is to convert png to bmp with the 3rd. programm, like convert, shell program

The new method   add_chart_ext () in this module is experiment. I think that it will not help your case.
You can download this module's packageSpreadsheet::WriteExcel from CPAN:
Don't install it, just unpackage and go to directory charts/ and read more about charts.txt and test demos.

Best,
    ulmer


------------------
Just 4 Fun
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP