简体   繁体   English

如何将所有Excel文件的名称从文件夹打印到R中的CSV?

[英]How to print the names of all excel files from a folder to a csv in R?

Request you to please help me with code/script in R which prints all the names of excel file present in a folder . 要求您在R中的代码/脚本方面为我提供帮助,该代码会打印出文件夹中存在的所有excel文件名称。

the name of one of the excel file in a folder is chaudhryaman_595_6140_a765tgha01tj9_C_51_M.xlsx 文件夹中一个excel文件的名称是chaudhryaman_595_6140_a765tgha01tj9_C_51_M.xlsx

there are 145 similar files and need to print the names of files with R 有145个类似文件,需要打印带有R的文件名

write.csv(list.files("path", pattern="*.xlsx"), file="excel_files.csv")

您可以根据需要更改模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM