全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
16675 19
2013-03-18
有一个数据文件是.dta格式的,我想将其保存为.xls格式的。
我尝试了复制,但是因为数据太多了,复制后有一些地方错位了,我也没法逐一改。我也试了什么stat transfer软件,也不可以。
我第一次用stata,应该有转换的命令,求助哪位好心人给我写一下命令?
明天就要交论文了,现在数据分析还没开始,在线等啊!急急急~~~

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-3-18 12:09:54

Title

    [D] import excel -- Import and export Excel files


Syntax

    Load an Excel file

        import excel [using] filename [, import_excel_options]


    Load subset of variables from an Excel file

        import excel extvarlist using filename [, import_excel_options]


    Describe contents of an Excel file

        import excel [using] filename, describe


    Save data in memory to an Excel file

        export excel [using] filename [if] [in] [, export_excel_options]


    Save subset of variables in memory to an Excel file

        export excel [varlist] using filename [if] [in] [, export_excel_options]


    import_excel_options                 Description
    -------------------------------------------------------------------------------------------------------------
    sheet("sheetname")                   Excel worksheet to load
    cellrange([start][:end])             Excel cell range to load
    firstrow                             treat first row of Excel data as variable names
    case(preserve|lower|upper)           preserve the case (the default) or read variable names as lowercase or
                                           uppercase when using firstrow
    allstring                            import all Excel data as strings
    clear                                replace data in memory

    locale("locale")                     specify the locale used by the workbook
    -------------------------------------------------------------------------------------------------------------
    locale() does not appear in the dialog box.


    export_excel_options                 Description
    -------------------------------------------------------------------------------------------------------------
    Main
      sheet("sheetname")                 save to Excel worksheet
      cell(start)                        start (upper-left) cell in Excel to begin saving to
      sheetmodify                        modify Excel worksheet
      sheetreplace                       replace Excel worksheet
      firstrow(variables|varlabels)      save variable names or variable labels to first row
      nolabel                            export values instead of value labels
      replace                            overwrite Excel file

    Advanced
      datestring("datetime_format")      save dates as strings with a datetime_format
      missing("repval")                  save missing values as repval

      locale("locale")                   specify the locale used by the workbook
    -------------------------------------------------------------------------------------------------------------
    locale() does not appear in the dialog box.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-18 12:15:15
我也在找这个。。哈哈。现在知道了。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-18 12:32:24

sysuse  auto, clear
export excel d:\auto.xlsx
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-18 12:37:31
蓝色 发表于 2013-3-18 12:32
sysuse  auto, clear
export excel d:\auto.xlsx
不对呀~~我的数据有几万个~这里面只有几个~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-18 12:38:00
熊豚豚 发表于 2013-3-18 12:15
我也在找这个。。哈哈。现在知道了。
那你告诉下我呗~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群