Re: [R] Creating file from raw content

2020-06-01 Thread jim holtman
You can read it in as 'raw' input <- file('your.xlsx', open = 'rb') # open as binary excel_file <- readBin(input, raw(), 1e8) # make sure you read in all the file close(input) output <- file('your_new.xlsx', 'wb') writeBin(excel_file, output) close(output) ===

[R] Creating file from raw content

2020-05-29 Thread Sebastien Bihorel via R-help
Hi, Let's say I can extract the content of an Excel .xlsx file stored in a database and store it as raw content in an R object. What would be the proper way to "create" a .xlsx file and "transfer" the content of this obj into it? I took the example of an Excel file, but my question would