Re: [R] Multiple CSV files in different sheets of an Excel file

2017-11-06 Thread Kamlesh Khollam
Hi Marc and Team, Apology for the late reply. I went through the github code for WriteXLS and accordingly passed required arguments. Its working fine now. I am able to create a excel workbook with multiple csv's. By Merge I mean create a excel workbook by adding multiple csv's as different sheets

Re: [R] Multiple CSV files in different sheets of an Excel file

2017-11-06 Thread Jeff Newmiller
You need to be more specific about what you mean by "merge" (read e.g. ?merge and ?rbind) and show what you did already using a reproducible example [1][2][3]. The fact that you mentioned sheets suggests you are writing to Excel files... they can be troublesome for storing data (NA values, siz

Re: [R] Multiple CSV files in different sheets of an Excel file

2017-11-06 Thread Marc Schwartz
> On Nov 6, 2017, at 3:23 AM, Kamlesh Khollam > wrote: > > Hi Team, > I am tried "WriteXLS" package for merging 2 csv files. R script runs > successfully but does not create CSVmerge file. > > Appreciate our help. > > ​Best Regards, > Kamlesh Khollam​ Hi, You appear to be replying to a thr

Re: [R] Multiple CSV files in different sheets of an Excel file

2017-11-06 Thread Kamlesh Khollam
Hi Team, I am tried "WriteXLS" package for merging 2 csv files. R script runs successfully but does not create CSVmerge file. Appreciate our help. ​Best Regards, Kamlesh Khollam​ [[alternative HTML version deleted]] __ R-help@r-project.org mai

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Marc Schwartz
Hi, Just to augment Jeff's comments, if you envision taking one of your CSV files (presuming that they are truly a CSV format) and opening it with Excel without any other pre-processing, that is what would happen by default with the majority of R tools that can create Excel files. Excel, as yo

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Jeff Newmiller
There is no such thing as a "csv sheet"... if you have a complex layout of data in one CSV file then if you want to import it into R then you are going to have to cobble together something that reads the file as character data and parses the pieces out using functions from the grep or sub catego

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Mohsen Jafarikia
Hi Frans, There is a problem that my csv files are not just several columns of data. I have some data and then a couple of tables after my data. I can't use read.table to read my files. There should be something different to look at the whole csv sheet. Thanks again, Mohsen On Wed, Jan 13, 2016

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Marc Schwartz
> On Jan 13, 2016, at 8:18 AM, Mohsen Jafarikia wrote: > > I have multiple CSV files that I would like to have them in a single Excel > file. For example, I have file1.csv and file2.csv and I want to have > file.xls where file1.csv and file2.csv each have been copied to a single > sheet of the f

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Mohsen Jafarikia
Thanks Frans, My files are CSV. If presume first I should convert them to Excel format and run the code you have suggested. Am I right? Thanks again, Mohsen On Wed, Jan 13, 2016 at 9:44 AM, Frans Marcelissen < fransiepansiekever...@gmail.com> wrote: > Hi Mohse, > You can do that with the appen

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Frans Marcelissen
Hi Mohsen, Just read them with read.csv or read.table (file1<-read.csv(file=.), and you can write them. Success! Frams 2016-01-13 15:47 GMT+01:00 Mohsen Jafarikia : > Thanks Frans, > > My files are CSV. If presume first I should convert them to Excel format > and run the code you have suggest

Re: [R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Frans Marcelissen
Hi Mohse, You can do that with the append parameter of the write.xlsx routine in the xlsx package: xlsx::write.xlsx(file1,file='X.xlsx',sheetName = '1') xlsx::write.xlsx(file2,file='X.xlsx',sheetName = '2',append = T) Success! Frans 2016-01-13 15:18 GMT+01:00 Mohsen Jafarikia : > I have

[R] Multiple CSV files in different sheets of an Excel file

2016-01-13 Thread Mohsen Jafarikia
I have multiple CSV files that I would like to have them in a single Excel file. For example, I have file1.csv and file2.csv and I want to have file.xls where file1.csv and file2.csv each have been copied to a single sheet of the file.xls file. Thanks, Mohsen [[alternative HTML version de