可能重复:
直接从 R 脚本读取 Excel 文件
我制作了一个 Excel 文件,我将其命名为test.xlsx. 我想在 R 中读取文件。  
date    price  
1        34  
2        34.5  
3        34  
4        34  
5        35  
6        34.5  
7        36  
现在,当我使用
x = read.csv("test.xlsx")  
没用。我也用过
x = read.table("test.xlsx")
我收到了警告
Warning message:
In read.table("test.xlsx") :
  incomplete final line found by readTableHeader on 'test.xlsx'  
结果:
 V1
1                         PK\003\004\024
2 PˆTز\005›DQ4ï½ùfىé|[™d\003\001µ³9\033g
那么,我是否需要制作一个特殊文件才能在 R 中读取它?