How to print exceldocument containing multiple worksheets with shellexecute

73 Views Asked by At

I have a shellcommand in a application that prints a exeldocument.

p1 = 'print'
p2 = 'c:\mydir\myexcel.xlsx'
p3 = ''
p4 = ''
p5 = 8
ShellExecute(GetDesktopWindow(),p1,p2,p3,p4,p5)

this works fine.

Now there are excel-files with more than one worksheet (tabs on the bottom). How can I force Shellexecute to print all worksheets?

(My app is running on a server with multiple clients, so a solution is asked that supports all clients).

1

There are 1 best solutions below

0
riffrazor On

I dont think ShellEx is going to provide a solution to this. There are 3rd party Clarion solutions that will do this (EasyExcel and Capesoft OfficeInside), but neither are free.