Creating a spreadsheet from an ASP page requires referencing Excel as a COM object on the hosting IIS server. To format the page of the spreadsheet, Excel has to have printers installed, but this can be a problem when called from ASP.
The workaround is to setup printers for the SYSTEM account (which is the account that ASP runs under).
- Ensure that the user you are currently logged into on the server has the desired printers installed.
- Launch the Registry Editor (Regedit.exe).
- Select the following key: HKEY_CURRENT_USER
\Software\Microsoft\Windows NT\Current Version\Devices - From the Registry menu, click Export Registry File.
- In the File Name text box, type c:\Devices.reg.
- Select the following key: HKEY_CURRENT_USER
\Software\Microsoft\Windows NT\Current Version\PrinterPorts - From the Registry menu, click Export Registry File.
- In the File Name text box, type c:\PrinterPorts.reg.
- Select the following key: HKEY_CURRENT_USER
\Software\Microsoft\Windows NT\Current Version\Windows - From the Registry menu, click Export Registry File.
- In the File Name text box, type c:\Windows.reg.
- From the Start button, select Run. Open Devices.reg in Notepad by typing Notepad Devices.reg in Run dialog box.
- Replace the text HKEY_CURRENT_USER with HKEY_USERS\.DEFAULT
- Save the file. Then import it into the registry by double-clicking the file in Windows Explorer.
- Repeat steps 13 through 15 for PrinterPorts.reg and Windows.reg
http://support.microsoft.com/kb/184291
No comments:
Post a Comment