view in Excel
-
-
hello sir in my project i have one button view in excel. In my project I have farpont spreadsheet when i click on view in excel button that time whatever we saw on farpoint spreadsheet that all save/view in excel spreadsheet. guide me. gayatri Gayatri
-
Hi Gayatri, Plz explain your query in details along with your code..and your problem. Happy Coding, AS@13
A key to every Solution
-
hello my project is related to shares. so i used farpoint spreasheet control in asp.net 2.0 which is look like excel spreadsheet. when i click on button that time all data (which is available on screen) will save in excel spreadsheet. Gayatri
-
What is the datasource for ur spreadsheet control??? U can create an excel with ur datasource directly.....
-
-
u can use com object and prepare excel directly from database. Get data from database in a dataset, create and excelapp, workbook,worksheet etc and then just loop through the dataset assign the values to each cell.
-
check out this one also easiest way-- Export data to excel[^]
hello i write code but when i clicked on button that time one dialogbox coming which ask "do you want to open or save file?" file name - frmAnalystass.xls when i click open that time one message coming "you can't read it" OR when click save button that time file is saved. when i open that saved file that time excel open but one message comming "you can't read it". so please help me. my code-==== protected void btnSaveToExcel_Click(object sender, EventArgs e) { objVarInit.sqlDS.Reset(); objVarInit.sqlDT.Reset(); objClsDllSql.sqlCon = objReadIniFile.funReadIniSql(); objClsDllSql.sqlCon.Open(); objVarInit.sqlDA = new SqlDataAdapter("select * from tUser", objClsDllSql.sqlCon); objVarInit.sqlDT = new DataTable(); objVarInit.sqlDA.Fill(objVarInit.sqlDT); objClsDllSql.sqlCon.Close(); Response.Clear(); Response.ContentType = "application/vnd.ms-excel"; string sep = ""; foreach (DataColumn dc in objVarInit.sqlDT.Columns) { Response.Write(sep + dc.ColumnName); sep = "\t"; } Response.Write("\n"); int i; foreach (DataRow dr in objVarInit.sqlDT.Rows) { sep = ""; for (i = 0; i < objVarInit.sqlDT.Columns.Count; i++) { Response.Write(sep + dr[i].ToString()); sep = "\t"; } Response.Write("\n"); } } gayatri Gayatri