dongxing2692 2014-07-29 15:51
浏览 409

自动从Web打印Excel文件

To explain a bit about the issue I have.

I have a system that generates excel based shipping labels.

We're changing the approach to create them and now we're looking for a way to print them as fast as possible.

The ideal result would be a button on the website which right after being clicked just triggers a local printer (user side of course) and prints straight away from the default printer no dialogs or anything.

Right now I've found two possible approaches to this.

1 - Windows software that auto prints when a file enters a specific folder:

I've found many of these and they work pretty good, the issue is that none of them is able to print xlsx files, only txt and pdf.

2 - A Windows macro recorder that right clicks / prints the excel file:

Its actually amazing the speed of the printout if you right click / print an excel file, opens excel prints on defaults settings and closes. Then the file should be auto deleted.

I haven't found any software that can do this properly, I found AutoIt but I'm not sure if its what I'm looking for.

My ideal solution would actually be based on PHP / Javascript / Ajax

But I haven't found not even a clue on doing such a thing with an excel file. I know it's doable with pdf files opening them on a new window and using js window.print()

Yet I would really like to use the xlsx format due to the great control I have over them using the PHPexcel library.

There is likely a new much better approach to this that I'm probably missing.

Thanks for any help I can get!

  • 写回答

1条回答 默认 最新

  • duanfangfei5558 2014-07-29 15:57
    关注

    Would rendering your Excel file as PDF serverside, then sending that to the client for printing be a potential solution? If so, the following may be of use:
    PHPExcel Save PDF
    and
    How to configure phpexcel for pdf

    评论

报告相同问题?

悬赏问题

  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致