Announcement

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

  • exporting a big dta file to excel

    I am trying to export a 4 columns and 290 million rows dta to an excel file but stata tells me:

    . export excel cep_res using "SIH_ceps", firstrow(variables)
    too many or no observations specified
    r(198);

    Is it because I have too many rows in my dta file? How could I solve this problem?

  • #2
    Code:
    help export excel
    Quote:

    Technical note: Excel data size limits

    For an Excel .xls-type workbook, the worksheet size limits are 65,536 rows by 256 columns. The string size limit is 255 characters.

    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.
    I am afraid your dataset is too big in its current format. Perhaps you can reshape your data from long to wide.

    Comment


    • #3
      By the way, the limits that Friedrich points out do not arise from Stata's export excel command. They are limits on the size of Excel files themselves. See https://support.office.com/en-nz/art...7-269d656771c3.

      Comment


      • #4
        Paula,

        What is your objective in converting a Stata file that large to Excel? I assume the intention is not that someone would actually use such a file in Excel; but perhaps you are using Excel as an intermediate conversion step? If so, perhaps there are other formats (such as CSV) which might be better suited to this task. If you are transferring the data to another statistical package, Stat/Transfer might be a good investment.

        Regards,
        Joe

        Comment

        Working...
        X