Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • importing big dataset to stata 12 mp

    hi
    i am a beginner at stata 12 mp , i have a large data ( about 550 000 variables ) but when i try to import it from excel i have an error message , what dhould i do ???
    thanks in advance
    Last edited by koukou limem; 26 Aug 2015, 09:33.

  • #2
    You can save from Excel as tab-delimited or comma-separated, then import to Stata.

    See also a response from Hua Peng (StataCorp) here, where an undocumented setting is revealed for such a case.
    ODBC is another solution.
    Last edited by Sergiy Radyakin; 26 Aug 2015, 09:43.

    Comment


    • #3
      You can also save the file as an Excel 97-2003 workbook (.xls) and import that. The 40 MB size limit applies to Excel 2007/2010 files (.xlsx).

      Comment


      • #4
        Friedrich Huebler i saved it as excel 97-2003 , the opening of the file was faster than before but the importation is unseccessful ( i got the same message ) should i change office 2003 ?
        Last edited by koukou limem; 26 Aug 2015, 10:23.

        Comment


        • #5
          Please say exactly what you typed and exactly what Stata typed (or did) in response.

          Comment


          • #6
            i typed file=>import=>excel spreadsheet then browse and i get this :

            Comment


            • #7
              Sergiy Radyakin i tried but no result

              Comment


              • #8
                Originally posted by koukou limem View Post
                Sergiy Radyakin i tried but no result
                Do you mean to say that you have tried to save the file as a tab-delimited file, and then tried to import it to Stata 12 and there was "no result"?
                What I posted was 3 (three) distinct ways. Which one did you try? What did you type? What was Stata's response?

                Comment


                • #9
                  Also, clarify what is your Excel file. You wrote that it has 550,000 variables. Excel files may not contain so many columns (Excel limits).

                  Comment


                  • #10
                    Sergiy asked good questions. Another mystery is why you are getting a message about an XLSX file when you are trying to import an XLS file.

                    Comment


                    • #11
                      sorry i mean the file has 550k observation , i save it at the first as excel 2003/2007 then as Friedrich Huebler avised me , i saved it as excel 97/2003
                      Last edited by koukou limem; 26 Aug 2015, 15:11.

                      Comment


                      • #12
                        Sergiy Radyakin i used your second method , i saved alsso the excel file as csv , the importation ( using insheet) is done but when i see the sata in stata i get all the values il the same column like this :

                        Comment


                        • #13
                          any suggestion please

                          Comment


                          • #14
                            Friedrich Huebler said :

                            "You can also save the file as an Excel 97-2003 workbook (.xls) and import that. The 40 MB size limit applies to Excel 2007/2010 files (.xlsx)."

                            This restriction was removed in Stata 13 hence it is still in effect if you are using Stata 12. As Sergiy Radyakin pointed out, you can use

                            Code:
                             set excelxlsxlargefile on
                            to bypass the restriction. Although be prepared for the possible side effects described in http://www.stata.com/statalist/archi.../msg01157.html


                            Hua

                            Comment


                            • #15
                              it's blocked when i used the code :
                              set excelxlsxlargefile on

                              Comment

                              Working...
                              X