The Excel PageSetup class must interact with the printer drivers on the server. If there are no installed printer drivers or access to them, any calls to this class will raise an exception.
You must ensure that the default printer is installed on the server and the printer drivers are installed. In addition, if you access this from ASP.net, there are access problems, and you must ensure that the ASP.Net account has permission to access the printer. See this article for some of the questions in more detail: http://support.microsoft.com/?id=291298
In general, if you are using Office 2007 or later, you should avoid server-side automation, as this can lead to unstable behavior - if possible, use Open XML formats. See http://support.microsoft.com/kb/257757
Bgrva source share