Click here to Skip to main content
15,888,224 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,

I need to export dataset to excel and then automate it to run once everyday. The .xls should save wihtout a prompt on a predefined location and then send email wiht the file as attachments. I think I know how to work on the process. How do I save the file w/o any manual interaction. The whole process needs to run without any manual interface. This is what I intend to -

A) Create a web service for creating the excel :
1) dataset in gridview
2) stream the gridview onto excel
3) save the file in a predefined location (suppress the Save As/Open popup)

B) Create a windows app:
1) Call the web service above
2) Schedule the exe to run at 9 am every day

Any ideas is really appreciated. I have email mechanism already set up. The main item I am looking for is the excel save without interaction.

Thanks
Pinky
Posted
Updated 11-Mar-11 2:59am
v2
Comments
Sandeep Mewara 11-Mar-11 8:59am    
Have you tried anything from your side till now? Stuck anywhere?
Pink12 11-Mar-11 9:04am    
@Sandeep - I have the web service done. The .xls file creation gives the Save As/Open pop up. How I do I let the program know to automtically do save everytime and dont show the pop up.

Thanks much
Pinky

1 solution

I think you are looking for something like this:
EPPlus[^] - It allows you to create excel documents without using excel.

A possible solution to the download problem can be found here: MyDownloader: A Multi-thread C# Segmented Download Manager[^]

Regards
Espen Harlinn
 
Share this answer
 
v2
Comments
Sandeep Mewara 11-Mar-11 14:16pm    
Interesting.. 5!

So does that save without prompt too? No manual step needed?
Espen Harlinn 11-Mar-11 17:14pm    
Thanks Sandeep, as I wrote it allows OP to create the spreadsheet server-side, but I guess saving it without a prompt can be done by allowing "unusual" privileges for active x scripting, or possibly by creating a download manager.
Sandeep Mewara 12-Mar-11 1:09am    
Oh ok. Great share :).

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