Click here to Skip to main content
16,012,843 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I use this code:
C#
appExl.Workbooks.Open(Server.MapPath("myData.xlsx"), Missing.Value, Missing.Value,Missing.Value,Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,Missing.Value, Missing.Value, Missing.Value, Missing.Value);

Excel file is not going to open. Why?
Posted
Updated 2-Jun-15 7:51am
v2
Comments
Abhipal Singh 2-Jun-15 12:50pm    
Can you please explain..? Your question and code both are unclear..
Richard Deeming 2-Jun-15 12:53pm    
For a start, Server.MapPath only applies to ASP.NET applications. Your question is tagged as WPF, so Server.MapPath isn't going to work.
Sergey Alexandrovich Kryukov 2-Jun-15 14:32pm    
How is that related to WPF? What Server.MapPath can possibly do with WPF?
—SA
ChrisCreateBoss 3-Jun-15 18:43pm    
As Richard and Sergey said, Server.MapPath will not work, since it only works in ASP.NET, and what do you try to do?, just open the file or read it into a dataGridView?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900