楼主: 拂去尘缘
857 4

[问答] R读取EXCEL求助 [推广有奖]

  • 0关注
  • 3粉丝

已卖:492份资源

副教授

65%

还不是VIP/贵宾

-

威望
0
论坛币
8949 个
通用积分
78.4484
学术水平
1 点
热心指数
2 点
信用等级
1 点
经验
14147 点
帖子
387
精华
0
在线时间
1213 小时
注册时间
2016-4-16
最后登录
2025-12-23

楼主
拂去尘缘 发表于 2017-9-18 10:10:59 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
  1. Read, write, format Excel 2007 and Excel 97/2000/XP/2003 files

  2. Description

  3. The xlsx package gives programatic control of Excel files using R. A high level API allows the user to read a sheet of an xlsx document into a data.frame and write a data.frame to a file. Lower level functionality permits the direct manipulation of sheets, rows and cells. For example, the user has control to set colors, fonts, data formats, add borders, hide/unhide sheets, add/remove rows, add/remove sheets, etc.

  4. Behind the scenes, the xlsx package uses a java library from the Apache project, [url]http://poi.apache.org/index.html.[/url] This Apache project provides a Java API to Microsoft Documents (Excel, Word, PowerPoint, Outlook, Visio, etc.) By using the rJava package that links R and Java, we can piggyback on the excellent work already done by the folks at the Apache project and provide this functionality in R. The xlsx package uses only a subset of the Apache POI project, namely the one dealing with Excel files. All the necessary jar files are kept in package xlsxjars that is imported by package xlsx.

  5. A collection of tests that can be used as examples are located in folder /tests/. They are a good source of examples of how to use the package.

  6. Please see [url]http://code.google.com/p/rexcel/[/url] for a Wiki and the development version. To report a bug, use the Issues page at [url]https://code.google.com/p/rexcel/issues/list.[/url] Questions should be asked on the dedicated mailing list at [url]http://groups.google.com/group/R-package-xlsx.[/url]

  7. Details

  8. Package:         xlsx
  9. Type:         Package
  10. Version:         0.5.7
  11. Date:         2014-08-01
  12. License:         GPL-3
  13. Author(s)

  14. Adrian A. Dragulescu

  15. Maintainer: Adrian A. Dragulescu <[email]adrian.dragulescu@gmail.com[/email]>

  16. References

  17. Apache POI project for Microsoft Excel format: [url]http://poi.apache.org/spreadsheet/index.html.[/url]

  18. The Java Doc detailing the classes: [url]http://poi.apache.org/apidocs/index.html.[/url] This can be useful if you are looking for something that is not exposed in R as it may be available on the Java side. Inspecting the source code for some the the R functions in this package can show you how to do it (even if you are Java shy.)

  19. See Also

  20. Workbook for ways to work with Workbook objects.

  21. Examples

  22. ## Not run:

  23. require(xlsx)

  24. # example of reading xlsx sheets
  25. file <- system.file("tests", "test_import.xlsx", package = "xlsx")
  26. res <- read.xlsx(file, 2)  # read the second sheet

  27. # example of writing xlsx sheets
  28. file <- paste(tempfile(), "xlsx", sep=".")
  29. write.xlsx(USArrests, file=file)


  30. ## End(Not run)
复制代码

求教,R读取excel怎么只有这一点介绍?
有没有其它选项?
比方说我想读取部分数据的选项?
请坛友和老师赐教
谢谢
二维码

扫码加我 拉你入群

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

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


沙发
ryoeng 在职认证  发表于 2017-9-18 16:08:18
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽

藤椅
屋檐滴语 发表于 2017-9-18 19:00:30
方案:
1.openxlsx包
2.readxl包
3.把excel转换为csv或者文本格式格式再读
4.RODBC包
5.xlsx包
6.XLConnect
已有 2 人评分论坛币 热心指数 收起 理由
ryoeng + 1 热心帮助其他会员
admin_kefu + 20 热心帮助其他会员

总评分: 论坛币 + 20  热心指数 + 1   查看全部评分

板凳
拂去尘缘 发表于 2017-9-18 20:22:51
ryoeng 发表于 2017-9-18 16:08
R利用openxlsx操作xlsx文件- R语言论坛- 经管之家(原人大经济论坛)
楼主可以任意读取表格上的任何一个格子 ...
多谢多谢

报纸
拂去尘缘 发表于 2017-9-18 20:24:06
屋檐滴语 发表于 2017-9-18 19:00
方案:
1.openxlsx包
2.readxl包
非常感谢,刚学R,非常感谢您

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 01:23