.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Adding data from Excel spreadsheet to SQL table

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
This is not a programming question, I simply have a lot of data in two columns in an excel spreadsheet of data that I gathered.  I want to copy and paste this (manually) into a table that I have created in my ASPNETDB in my ASP.NET web application.  I thought it'd be as easy as copy the column, and hit paste in the "table data" view, but it's not (it only pastes one cell).Is there a way for me to manually copy data from excel and paste it in a table in my SQL Server?Thanks in advance! :)

View Complete Post

More Related Resource Links

Creating an Excel Spreadsheet and Adding Data to It Programmatically

The Interoperability services make it veryeasy to work with COM Capable Applications such as Word and Excel. Thisarticle reveals using Excel from a managed application. Excel is thespreadsheet component of Microsoft Office 2000. The majority of Excelprogrammatic functionality is exposed through Automation via the typelibrary Excel9.olb. The intention of this article is to express that amanaged application can interrelate with Excel as a COM server.

Excel External Table Data can only create new SharePoint List when Exporting from Excel?

I have a SQL Query that I refresh everyday in Excel. I want to be able to export this list over to a SharePoint list right after my refresh in Excel but I can only Export to a SharePoint list only once. If I try to export again to the same list then it will give me the error "The specified list name is already in use on this server. You must rename the list before publishing it to the server." I have web parts that have connections to this list and I do not want to export my Query to a new SharePoint list everyday. Does anyone know a way around this issue?

data from html table to datareader to excel

helloi have to collect data from a website which is in table format, i have to put the table row into specific row and colum in excel, can anyone tell me how do i do itfor examplehttp://www.bizrate.com/ratings_guide/merchant_detail__mid--44084.htmlit has rating so how can i put those rating into any kind of database or excel??i want to pass the url and it should scan and filter it.can anyone tell me how this can be done. thnks in advance

Output table from database to excel spreadsheet asp.net c#

Hi All, I'm hoping someone can help me with a small problem. I want to output some data returned from a sql server database and output it out to an excel file. My thinking was to create some excel templates, copy the required one that I want to use and output the data to that. I can pull the data back from the database OK, but have no idea how to write this to the excel spreadsheet. I want to try and keep the code as generic as possible so that I can use it to output a resultset to the correct copied template. Any help or pointers would be greatly appreciated.

adding Primary key to a data table

Hi All, I have a data table this table saves values from a form's add button and binds to a gridview on the final submit button adds to the data base. See my Data table below    DataTable dt = new DataTable();                   if (ViewState["CompDetails"] == null)            {                 dt.Columns.Add("CourseCode");                dt.Columns.Add("CourseName");                dt.Columns.Add("Fees");            }            else                dt = (DataTable)ViewState["CompDetails"];            DataRow dr = dt.NewRow();                                &n

Import Access table or Excel spreadsheet into Oracle table


I am trying to import from an Excel spreadsheet or an Access database into an Oracle table.  I used the SSIS Import and Export wizard to create the SSIS packages, but everytime that I attempt to run the package, SSIS stops once it gets to the Pre-Execute phase.  There are never any errors.  Am I doing something that cannot be done?

I'm using the following:  SSIS 2005, Microsoft Oracle OLEDB provider (MSDAORA.1), Excel and Access 2003

By the way, I am able to successfully export from the Oracle database to either Excel or Access using SSIS.


Insert Data to table from excel file


guys, i am new to sql development

my question is how do i import data from an excel table,

i was trying to do it via a query and just paste the values, but received a syntax error. thanks

data structure is:


SSIS 2005 - Export Data into an Excel 2007 Table


Hello !

I have an excel file (xlsx) containing a table :

Excel Table

Once I launched my ssis task (successfully) to insert data in it, it is actually append after the table :

Excel Table after the SSIS task

So I am looking for a way to insert into the table and expand it with the data. I hope someone could help me.

Thank you !

Adding bulleted data to Excel using XSLT


I had created a XSLT which converts the XML file generated from the system to the excel format. The XSLT has the styles required for this transformation.

Now i need to add data in bulleted format in the excel column. Is it possible to do using XSLT

Writing data from Gridview to Excel spreadsheet


Found code to do this but get an error I cannot correct.

Error is:

Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server.

This statement gives me the error: gv.RenderControl(htw)

Any help is really appreciated.  I got this cod from other threads in here

Here is the asp and the vb code:

Main asp page:

<form id="form1" runat="server">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
            AllowSorting="True" DataSourceID="SqlDataSource1" Width="809px">
                <asp:CommandField ShowDeleteButton="True" />

TableMappings not adding data to second table?????


 HI Here is my code: 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim strConn As String = "server=WORKER;Initial Catalog=eSurvey_DotNet;User ID=WorkerAdmin; Password=WorkerAdmin"
            Dim strSql As String = "SELECT InspectionID, SurveyDate FROM " + " eSurv_Inspections; " + "SELECT ViolationID, InspectionID " + " FROM eSurv_Violations;"
            Dim conn As New SqlConnection(strConn)
            Dim da As New SqlDataAdapter(strSql, conn)
            da.TableMappings.Add("Inspections1", "eSurv_Violations")
            Dim _ds = New DataSet()
            da.Fill(_ds, "eSurv_Inspections")

Adding data to table using linq to sql


Hi all, i am very new at this and are looking for some help. i have to tables, Question( Qid,question,answer,Cid ) and Category( Cid,category ), the primary keys are Qid and Cid, the Cid is a foreign key in Question, when i want to add a new question to Question i am choosing a category from a DropDownList controll, and if want to add a new category at the same time i have a TextBoks for it, i have create a Model, BLL and DAL classes, my problem is:

in the DAL class i want to add a new row to Question, but i need to check first if the object.category exsist in the table Category, if it does i want to get the Cid for it if it dosen't exist i want to create a new raw then get the Cid, this is my code: please finish my code with some explanaitions

public string add(Faq inFaq)
            using (var db = new DBClassDataContext())
                    var se = from Ca

SSRS 2008 - Excel Export adding unwanted total columns to spreadsheet



I have a SSRS 2008 report which has 3 column groups which when i export to Excel the resulting excel spreadsheet has an additional total column for each of the groups.  I dont have this displayed in the report and dont want it displayed in teh excel export, is there anyway to turn this off?

I've had a search of this forum but so far i've been unable to find a solution(or someone else having the same problem)


Error inserting data in Excel spreadsheet from SQL 2005 SP



I am using a SP on a SQL 2005 server to insert data into an Excel spreadsheet.

If I run the following query:



INTO OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0','Data Source ="\\wvns01\data\Finance\ZIP\FY2011_testZIP\BankFile.xls";extended Properties=Excel 8.0')...

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend