import Excel to postgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nehashri
    New Member
    • Jan 2007
    • 49

    import Excel to postgreSQL

    hello
    i have my data stored in different Ms Excell sheets. now I am planning to make a database of the data i have. but i m confused whether to use Postgresql or mySQL for the same. i had plans to import data directly to Ms Access but there is problem with my access for now so i have to think of other choises.

    i wanted to know whether it is easy to convert excel sheets to postgre that is can i import excel to postgreSQL. if yes how can i go about
    thanking u in advance
    neha
    Last edited by nehashri; May 14 '07, 06:21 AM. Reason: spealing mistakes
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    If you can dump your spread sheet into the ASCII delimited file you can use the Postgresql COPY command to load it into the database table.
    You can also google for "migration to Postgresql"; you'll find some third-party tools (some of them are free or have a free trial period) that do data-pumping and can help you with migration.

    Comment

    • nehashri
      New Member
      • Jan 2007
      • 49

      #3
      Originally posted by michaelb
      If you can dump your spread sheet into the ASCII delimited file you can use the Postgresql COPY command to load it into the database table.
      You can also google for "migration to Postgresql"; you'll find some third-party tools (some of them are free or have a free trial period) that do data-pumping and can help you with migration.
      thank you so much.......i am sure that will be of great help
      neha

      Comment

      • varathasiva
        New Member
        • Sep 2006
        • 20

        #4
        U can use the excel application through by coding u can excport data to postgres sql table to excel like verse visa

        Comment

        • coolminded
          New Member
          • Mar 2007
          • 137

          #5
          Originally posted by varathasiva
          U can use the excel application through by coding u can excport data to postgres sql table to excel like verse visa

          can anyone be more specific or any link on how to export data from excel to postgresql database. i could not get varathasiva, what he wants to say

          plz help

          Comment

          • varathasiva
            New Member
            • Sep 2006
            • 20

            #6
            Here i enclosed my sample codings.If you need you can use the coding like in delphi programing
            Code:
             var strFileName,cnt_str:string;
             flcid,cnt,scnt,i :integer;
             Temp_Worksheet : _WorkSheet;
            begin
              if chk_ch then
                begin
                 try
                  ExcelApplication1.Disconnect;
                 finally
                end;
                end;
                ExcelApplication1.Connect;
                ExcelApplication1.Visible[0]:=True;
                 try
                 ExcelWorkbook1.Disconnect;
                finally     end;
            
                ExcelWorkbook1.ConnectTo(ExcelApplication1.Workbooks.Add(EmptyParam,0));
            
                Temp_Worksheet:=ExcelWorkbook1.
                WorkSheets.Add(EmptyParam,EmptyParam,EmptyParam,EmptyParam,0) as _WorkSheet;
                ExcelWorkSheet1.ConnectTo(Temp_WorkSheet);
            Last edited by michaelb; Jun 5 '07, 07:38 AM. Reason: Added the CODE tags

            Comment

            • ryjfgjl
              New Member
              • Apr 2022
              • 9

              #7
              This tool will be very useful if you do not want to code
              or you are not clear about pg:

              Import excel into database automatically-ExcelToDatabase

              Comment

              • coldbluts
                New Member
                • Apr 2024
                • 2

                #8
                i am sure that will be of great help

                Comment

                Working...