Click here to Skip to main content
16,022,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to export a table to excel. I do have a solution on how to go about this tho. The issue i have is that i have add a class to my project to the carry out this task but i noticed i can't make use of the neccessary stuffs i need to complete the export to excel task. i can't access Response.ContentType, Response.AddHeader and others. So i'm asking, what namespace to need to add to be able to access the Response class. I have googled tho but can't seems to find out a solution.

What I have tried:

I have made use of the code i have in my project and its working. i copied this same code and pasted it in a class a created but all i have are series of errors
Posted
Comments
Azziet 13-Dec-16 2:56am    
Please share the errors
are you missing any assembly reference?
are you using the code in any popup ? - https://forums.asp.net/t/1309905.aspx?Response+ContentType+Response+AddHeader+in+popup+stops+working+after+Vista+SP1+
Mcbaloo 13-Dec-16 2:57am    
i think i'm some assembly reference in the class i created.

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