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

i have a senario like i need to generate excel sheets by
getting certain columns into a grid quried from db
and iam generating a set of files by dividing the records so queried to the grid

set of records are writing to excel based on certain grouping criteria
i.e. suppose my app is generated 5 excel files

step one
Emp No Emp Name Dept age exp
1001, VIKRAM, D1, 20, 2
1014, PRUTHVI, D1, 34, 14
1015, MADHU, D1, 40, 16

1002, RAJU, D4, 30, 11
1004, SAGAR, D4, 19, 1
1007, LAVANYA, D4, 36, 13
1011, RAKESH, D4, 32, 7

1005, RAKESH, D5, 23, 3
1009, PADMA, D5, 20, 2
1013, ANOOSH, D5, 23, 5

1003, SUMAN, D6, 32, 19
1006, RAJENDER, D6, 45, 18
1008, ANUSHA, D6, 34, 13
1010, SHIVAKUMAR, D6, 30, 6
1012, SALMAN, D6, 19, 2


suppose the above data is generated 4 files based on "DEPT"
with file names

02Apr2011_D1_1.xls with 3 records
02Apr2011_D4_1.xls with 4 records
02Apr2011_D5_1.xls with 3 records
02Apr2011_D6_1.xls with 5 records

respectively
and suppose

my proj is in
c:\inetpub\wwwroot\EmpReports\
and the files so generated using COM class library
are generated in below location

c:\inetpub\wwwroot\EmpReports\UploadFiles\EmpDownload\

now MY Question is how to provide a means
to generate these files and get these files
to the local location from where(some machine in local network or in internet) the application is browsing thru url.
Posted
Comments
Albin Abel 2-Apr-11 3:26am    
can't the generated files can be accessed through its url path?
pankajupadhyay29 2-Apr-11 5:00am    
it is not clear if you just want to download these files at client side or something else????

1 solution

You can't save files to the local system without user interaction. You could display a hyperlink to the file, perhaps in modal dialog to get their attention, or you could push the file and cause the save dialog to open. Either way though you can't place it directly on the local system yourself.
 
Share this answer
 
v2
Comments
#realJSOP 2-Apr-11 10:55am    
5 - proposed as 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