These days are depressing. Only one day. To complete an EXCEL report in any form in the asp.net Environment
Issued. Upload. Statistics.
I have never written office programs before. MSDN is still in February. No way. You have to watch it.
X: \ Program Files \ Microsoft Visual Studio. NET
2003 \ SDK \ v1.1 \ Samples \ Technologies \ Interop \ Applications \ Office \ Excel
DEMO.
I use OFFICE2003.
As stated in the SDK
Set ExcelTlb = D: \ Program Files \ Microsoft Office \ Office11 \ excel.exe
Then
Nmake D: \ Program Files \ Microsoft Visual Studio. NET
2003 \ SDK \ v1.1 \ Samples \ Technologies \ Interop \ Applications \ Office \ Excel \ makefil
E
OK
Winform runs normally. For the code, see. AutoExcel. cs
But the same code is thrown into asp.net.
First sentence
Application app = new Application ();
An error was reported. :(
Follow the first prompt: Add AutoExcel. cs to web. config.
<Identity impersonate = "true"/>
Then F5 :). OK. The first sentence is acceptable. However
System. Runtime. InteropServices. COMException: Server exceptions
This is terrible.
I tried it for half a day. No results. No way.
I found another gun and wrote a COM script. The result winform is easy to use. But webform is still the same. Depressing
Home now.
I reviewed GOOGLE and finally found the ultimate solution.
"Configure Dcom. Run dcomcnfg.exe, find the Excel application, configure its attributes, and select the authentication level"
"None", select "Interactive User" as the ID, and access the security page.
Everyone ."
This story is really useful to my wife and wife. Once the configuration is complete. Haha. Yes.
Otherwise, the source code cannot run :(