did you mean
i have data in sql server database and
1) I want to have a asp.net page, where user can select the date range and depending on that selection, data from somexyztable will be exported in tab delimited file. (AND ALSO a page where i can get a tab delimited file as input from user and want to insert the record inxyz table)
2) i want to know the way i can import export data ofxyz table from my sql server database.
tell us,
I need to know the #1 response in the above post
1) I want to have a asp.net page, where user can select the date range and depending on that selection, data from somexyztable will be exported in tab delimited file. (AND ALSO a page where i can get a tab delimited file as input from user and want to insert the record inxyz table)
|||Ok
what I'd suggest you in that case is,
- Take from/to dates from user by putting two calender (or your choice of) control on the page.
- put a datagrid with visible=false set.
NOW,
To export xyz table to excel
- populate grid with data fetch from xyz using ado.net
- export the grid to excel.
- take a look"Export ASP.NET DataGrid to Excel" at, http://www.c-sharpcorner.com/UploadFile/DipalChoksi/ExportASPNetDataGridToExcel11222005041447AM/ExportASPNetDataGridToExcel.aspx
- try googling, "asp.net export to excel" (http://www.google.co.in/search?q=asp.net+export+to+excel)
To import excel to xyz table
- take a look "Import Excel Spreadsheet Data into SQL Server Database Table Using SqlBulkCopy" at, http://davidhayden.com/blog/dave/archive/2006/05/31/2976.aspx
hope it helps.
No comments:
Post a Comment