Click here to Skip to main content
15,917,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I have one requirement.....

I want data from sql table to exel sheet and
want to send that exel sheel on mail.All these steps are completed without any user intervention
by using remote server connection

I am also confused where do I create the exel sheet because both application and database are on remote server

And the mail is sent only once per day at particular time


Thanks
Posted

1 solution

You can write a windows service or schedule a console application which contains codes for -
Step 1: Retrieve Data from Remote Server (Assuming you have database ip, username and password)
Step 2: Store retrieved data into a datatable.
Step 3: Export data from datatable to excel.
Step 4: Send a mail with the excel file as an attachment.

You can get help with steps by googling. :)

Note: the excel sheet will be created on the machine which runs the console app/win service designed by you.
 
Share this answer
 
v2

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