liexiagao 发表于 2012-3-19 10:04 
只能在你9087行 里调整,或按规律拷贝出来,才可去掉空格。或者下载时选择一种其他的保存方式,如文本方式, ...
呃……这个就是原始数据,没有其他格式了……
个人瞎琢磨的lame方案来了:
拷出两列(比如date和firm name)到Word,convert to text,再convert to table,大概是这个造型——
date firm
1/1/1982 | Green Cross Corp |
Grupo Grifols SA | |
1/1/1982 | L'Oreal SA |
Fujisawa Pharmaceutical Co Ltd | |
1/1/1983 | Novo Industri AS |
Connaught Biosciences Inc | |
12/1/1984 | Astellas Pharma Inc |
Eli Lilly & Co | |
1/1/1985 | Green Cross Corp |
Biogen Inc | |
1/1/1985 | Biotechnology Investments Ltd |
Immunetech Pharmaceuticals | |
1/1/1985 | Astellas Pharma Inc |
Rorer Group Inc | |
1/1/1985 | Toyobo Co Ltd |
Genetics Technology | |
1/1/1985 | LCF Rothschild Group |
Immunetech Pharmaceuticals | |
1/1/1985 | Pharmacia ENI |
Hoechst AG | |
然后拷到stata,运行
gen wp=0
replace wp=1 if firm==""
replace firm = date if wp==1
replace date ="" if wp==1
得到的结果就大体是这样了……
date | firm | wp |
1/1/1982 | Green Cross Corp | 0 |
| Grupo Grifols SA | 1 |
1/1/1982 | L'Oreal SA | 0 |
| Fujisawa Pharmaceutical Co Ltd | 1 |
1/1/1983 | Novo Industri AS | 0 |
| Connaught Biosciences Inc | 1 |
12/1/1984 | Astellas Pharma Inc | 0 |
| Eli Lilly & Co | 1 |
1/1/1985 | Green Cross Corp | 0 |
| Biogen Inc | 1 |
1/1/1985 | Biotechnology Investments Ltd | 0 |
| Immunetech Pharmaceuticals | 1 |
然后再给每个alliance赋个id,把date补齐;同理把date和description做一遍,然后通过统一的id再merge到一块儿。
不直接把3列都convert to text再convert to table是因为在转回table的时候word只能生成2列column,3列一起转name和description就混一块儿了。
求优化