locked
Import excel data into sql database RRS feed

  • Question

  • Hi,

    I'm quite new to MOSS 2007 and i'm not that good with C#.I need to do student performance tracking system using MOSS 2007.My problem right now is to import the excel data into sql database.I need to import this data from 2 different sheets which is ICA & Max to different tables in sql database. ICA contains the students results and details and Max contains the percentage of the scores.Can anyone please help me.
    Sunday, July 26, 2009 4:44 AM

Answers

  • > I don't want to import into a sharepoint list. Can I directly import the excel data from the excel book into sql database??

    Ok, but that's not a SharePoint question...  ;-)

    In SQL Server you can use SSIS (easist way if you know SSIS) 
    http://msdn.microsoft.com/en-us/library/ms141683.aspx
    also: http://blogs.techrepublic.com.com/datacenter/?p=205

    You can also open Excel as an ADO or ADO.NET data source. You can then write a VB6 or .Net application to read rows from the Excel file and then write to the SQL table.
    http://support.microsoft.com/default.aspx/kb/316934


    Important: Don't add tables to SharePoint databases. Store your custom tables in their own databases.


    Mike Smith TechTrainingNotes.blogspot.com
    • Proposed as answer by Dave Hunter Sunday, July 26, 2009 6:32 AM
    • Marked as answer by Chengyi Wu Monday, July 27, 2009 5:35 AM
    Sunday, July 26, 2009 5:48 AM
  • Thanks for your reply.

    Unfortunately, I'm doing a project based on c# programming. It'll be better if it's using c# codings.

    Thanks anyway.

    Well then... open Excel as an ADO or ADO.NET data source using c#
    Mike Smith TechTrainingNotes.blogspot.com
    • Marked as answer by Chengyi Wu Monday, July 27, 2009 5:35 AM
    Sunday, July 26, 2009 7:52 AM

All replies

  • You say SQL, but do you mean you want to import into a SharePoint list?  If a SharePoint list then you can just use Site Actions, Create, Import Spreadsheet. As long as the data is in consistant row and column format with column headings it should be easy to import.



    Mike Smith TechTrainingNotes.blogspot.com
    Sunday, July 26, 2009 5:02 AM
  • Thanks for the reply.

    I don't want to import into a sharepoint list. Can I directly import the excel data from the excel book into sql database??
    Sunday, July 26, 2009 5:32 AM
  • > I don't want to import into a sharepoint list. Can I directly import the excel data from the excel book into sql database??

    Ok, but that's not a SharePoint question...  ;-)

    In SQL Server you can use SSIS (easist way if you know SSIS) 
    http://msdn.microsoft.com/en-us/library/ms141683.aspx
    also: http://blogs.techrepublic.com.com/datacenter/?p=205

    You can also open Excel as an ADO or ADO.NET data source. You can then write a VB6 or .Net application to read rows from the Excel file and then write to the SQL table.
    http://support.microsoft.com/default.aspx/kb/316934


    Important: Don't add tables to SharePoint databases. Store your custom tables in their own databases.


    Mike Smith TechTrainingNotes.blogspot.com
    • Proposed as answer by Dave Hunter Sunday, July 26, 2009 6:32 AM
    • Marked as answer by Chengyi Wu Monday, July 27, 2009 5:35 AM
    Sunday, July 26, 2009 5:48 AM
  • Thanks for your reply.

    Unfortunately, I'm doing a project based on c# programming. It'll be better if it's using c# codings.

    Thanks anyway.
    Sunday, July 26, 2009 6:55 AM
  • Thanks for your reply.

    Unfortunately, I'm doing a project based on c# programming. It'll be better if it's using c# codings.

    Thanks anyway.

    Well then... open Excel as an ADO or ADO.NET data source using c#
    Mike Smith TechTrainingNotes.blogspot.com
    • Marked as answer by Chengyi Wu Monday, July 27, 2009 5:35 AM
    Sunday, July 26, 2009 7:52 AM