Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. view in Excel

view in Excel

Scheduled Pinned Locked Moved ASP.NET
tutorial
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    niki_nilu
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • N niki_nilu

      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

      A Offline
      A Offline
      AS 13
      wrote on last edited by
      #2

      Hi Gayatri, Plz explain your query in details along with your code..and your problem. Happy Coding, AS@13

      A key to every Solution

      N 1 Reply Last reply
      0
      • A AS 13

        Hi Gayatri, Plz explain your query in details along with your code..and your problem. Happy Coding, AS@13

        A key to every Solution

        N Offline
        N Offline
        niki_nilu
        wrote on last edited by
        #3

        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

        P 1 Reply Last reply
        0
        • N niki_nilu

          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

          P Offline
          P Offline
          Prateek G
          wrote on last edited by
          #4

          What is the datasource for ur spreadsheet control??? U can create an excel with ur datasource directly.....

          N 1 Reply Last reply
          0
          • P Prateek G

            What is the datasource for ur spreadsheet control??? U can create an excel with ur datasource directly.....

            N Offline
            N Offline
            niki_nilu
            wrote on last edited by
            #5

            hello i am using sql datasource. gayatri Gayatri

            N 1 Reply Last reply
            0
            • N niki_nilu

              hello i am using sql datasource. gayatri Gayatri

              N Offline
              N Offline
              niki_nilu
              wrote on last edited by
              #6

              hi i am using asp.net 2.0 my project is shares related. and i am using ado.net and sql database. then how to export my application to excel. Gayatri

              P 1 Reply Last reply
              0
              • N niki_nilu

                hi i am using asp.net 2.0 my project is shares related. and i am using ado.net and sql database. then how to export my application to excel. Gayatri

                P Offline
                P Offline
                Prateek G
                wrote on last edited by
                #7

                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.

                P 1 Reply Last reply
                0
                • P Prateek G

                  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.

                  P Offline
                  P Offline
                  Prateek G
                  wrote on last edited by
                  #8

                  check out this one also easiest way-- Export data to excel[^]

                  N 1 Reply Last reply
                  0
                  • P Prateek G

                    check out this one also easiest way-- Export data to excel[^]

                    N Offline
                    N Offline
                    niki_nilu
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups