Announcement

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

  • Excel import to 40 mb avoidable by using the writter command instead of the menubar

    EDIT: correct title is "Excel import limit to 40 mb avoidable by using the written command instead of the menubar"



    Hi all,

    I've always used the command line to import excel files into STATA and I never noticed that there is a 40mb size limit to excel files.
    Even at the current time, the limit is avoidable by using the command:

    Code:
    import excel "filnemae.xlsx", sheet("sheetname") firstrow
    I didn't notice any loss in rows on columns but now I'm wondering if my data are corrupted.

    Thanks
    Last edited by Valentino Santori; 17 Oct 2022, 11:56.

  • #2
    I do not know where the 40mb limit comes from. It is news to me, but as I always do this from a do-file, perhaps I have simply never been bitten by it. The PDF documentation provided by StataCorp says:
    For an Excel .xlsx-type workbook, the worksheet size limits are 1,048,576 rows by 16,384
    columns. The string size limit is 32,767 characters.
    Added: Just to check on my setup (Windows 10, Stata version 17.1 MP4) I imported an .xlsx file of size 54,355,457 (42 vars, 248,831 obs) from the command line. There was no difficulty doing so.
    Last edited by Clyde Schechter; 17 Oct 2022, 12:06.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      I do not know where the 40mb limit comes from. It is news to me, but as I always do this from a do-file, perhaps I have simply never been bitten by it. The PDF documentation provided by StataCorp says:


      Added: Just to check on my setup (Windows 10, Stata version 17.1 MP4) I imported an .xlsx file of size 54,355,457 (42 vars, 248,831 obs) from the command line. There was no difficulty doing so.
      Maybe I explained myself wrongly.
      I can load the excel from the command line while I can't from File > Import > "Excel spreadsheet" where I get the 40mb limit warning.

      I'm on MacOS 12.6 Intel, STATA 17.0

      Comment


      • #4
        Oh, I misunderstood. But I just now tried it from File > Import > "Excel spreadsheet" and, again, it worked with no difficulties on that same file.

        Comment


        • #5
          I've found this topic https://www.statalist.org/forums/for...les-into-stata that I probably missed before.
          Maybe the command line uses this setting by default.

          Comment


          • #6
            No one is going to misread this but for the record

            mb means millibar

            MB means megabyte

            Call me pedantic; I don't regard that as an insult.

            Comment


            • #7
              I apologize for the typos in my first message - I was typing from my mobile, with a double-language keyboard and a limited connection. I take the blame for that and I tried to re-edit as much as I could.
              I relied on the context of the question. Furthermore, I hope anyone didn't try to connect a pipeline to his own computer and tried to measure pressures with STATA in order to reproduce this error.
              Thanks

              Comment


              • #8
                That's fine. Your question was clear.

                Comment

                Working...
                X