免费注册 查看新帖 |

Chinaunix

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

万能的perl ,在Win32平台,输出Excel表到打印机。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-02 19:40 |只看该作者 |倒序浏览
万能的perl ,在Win32平台,输出Excel表到打印机。办不到吗?
我Google了无数次,本版也只有两个帖子,而且,未见应答,
在cpan上找到PrintExcel模块http://search.cpan.org/~havi/Spr ... /PrintExcelSheet.pm,但不能安装,
难道没有其他方法?挑战perl高手!

论坛徽章:
0
2 [报告]
发表于 2011-12-02 20:33 |只看该作者
补充:例如,输出到winxp的默认打印机。

论坛徽章:
1
未羊
日期:2014-09-08 22:47:27
3 [报告]
发表于 2011-12-02 22:40 |只看该作者
Win32::OLE 应该能满足楼主的要求,但是具体参数得查手册的。

论坛徽章:
3
技术图书徽章
日期:2013-12-14 13:31:0615-16赛季CBA联赛之八一
日期:2016-03-10 18:23:4615-16赛季CBA联赛之青岛
日期:2016-03-19 11:36:04
4 [报告]
发表于 2011-12-02 23:19 |只看该作者
flw版主曾推荐 Excel::Writer::XLSX - Create a new file in the Excel 2007+ XLSX format(兼容2003).

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
5 [报告]
发表于 2011-12-03 10:12 |只看该作者
我刚才试过这个模块,是可以打印的。
  1. ppm install Spreadsheet-PrintExcelSheet
复制代码
  1. use strict;
  2. use warnings;
  3. use Smart::Comments;

  4. use Spreadsheet::PrintExcelSheet qw(PrintIt);

  5. PrintIt( 'C:/Users/flw/Desktop/研发任职资格模拟认证.xls', 'all' );
复制代码
可以把四个工作表都打印出来。

Windows 7
ActivePerl 5.14

论坛徽章:
0
6 [报告]
发表于 2011-12-03 10:33 |只看该作者
我安装了四五次都失败了。
C:\Documents and Settings\Administrator>ppm install Spreadsheet-PrintExcelSheet
Downloading ppm4.activestate.com packlist...done
Updating ppm4.activestate.com database...done
Downloading www.bribes.org packlist...done
Updating www.bribes.org database...done
Downloading ppd.develop-help.com packlist...not found
Downloading www.lostmind.de packlist...not modified
Downloading log4perl.sourceforge.net packlist...redirect
Downloading log4perl.sourceforge.net packlist...done
Downloading log4perl.sourceforge.net Log-Dispatch-FileRotate PPD...not modified
Downloading log4perl.sourceforge.net Log-Dispatch PPD...not modified
Downloading log4perl.sourceforge.net Log-Log4perl PPD...done
Downloading log4perl.sourceforge.net Params-Validate PPD...not modified
Downloading www.roth.net packlist...done
Downloading www.roth.net GDBM_File PPD...done
Downloading www.roth.net Win32-AdminMisc PPD...not modified
Downloading www.roth.net Win32-API-Prototype PPD...not modified
Downloading www.roth.net Win32-Daemon PPD...not modified
Downloading www.roth.net Win32-EventLog-Message PPD...not modified
Downloading www.roth.net Win32-Exchange PPD...not modified
Downloading www.roth.net Win32-Message PPD...done
Downloading www.roth.net Win32-ODBCBETA PPD...done
Downloading www.roth.net Win32-Perms PPD...not modified
Downloading www.roth.net Win32-Pipe PPD...not modified
Downloading www.roth.net Win32-RASAdmin PPD...done
Downloading www.roth.net Win32-Scheduler PPD...done
Downloading www.roth.net Win32-Tie-Ini PPD...done
Downloading www.roth.net Win32-Volume PPD...done
Downloading ppm.gingerall.cz packlist...not found
Downloading ppm.tcool.org packlist...done
Updating ppm.tcool.org database...done
Downloading trouchelle.com packlist...not modified
Downloading theoryx5.uwinnipeg.ca packlist...not modified
Downloading voltar.org packlist...not modified
Downloading www.wxperl.co.uk packlist...not modified
Downloading www.wxperl.co.uk packlist...not modified
Downloading www.bribes.org packlist...done
ppm install failed: DBD::SQLite::db do failed: column packlist_uri is not unique


Windows xp
ActivePerl 5.8.9

论坛徽章:
3
技术图书徽章
日期:2013-12-14 13:31:0615-16赛季CBA联赛之八一
日期:2016-03-10 18:23:4615-16赛季CBA联赛之青岛
日期:2016-03-19 11:36:04
7 [报告]
发表于 2011-12-03 15:31 |只看该作者
我的安装成功,ActivePel5.14。WinXP,你怎么不升级一下Perl版本?

论坛徽章:
0
8 [报告]
发表于 2011-12-04 17:02 |只看该作者
果然还是难不住flw呀~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP