I have requirement to create csv file from a reports and save this file in the file cabinet folder by Suite Script. Is it possible to do so. can reports be exported into csv file by script.
An example of how to do it:
var csvFile=file.create({
name:'test.csv',
contents:'xxxx',
folder:folderId,
fileType:'CSV'
});
csvFile.save();
Related
I have a python code that is taking some info from a website by selenium and then write them into a json file, after I created an '.exe' file by pyinstaller and run it I don't know where this json file is saved.
Where could be saved, should be in the initial directory?
On a mac using iCloud file optimization, large files that are seldom used are uploaded to iCloud and only a small pointer file is left. When I look for the file in Finder, I see the file name and to the left is an icon that indicates that the file is in the cloud. To access the file, I click on the icon and the file is downloaded. With the file.exist command, R returns FALSE for the existence of the file. But after some research I found that the file link is stored in a directory below ~/Library/Mobile\ Documents/com~apple~CloudDocsand the file name is changed to xxx.icloud where xxx is the original file name.
Here's an example of the path to a a directory that holds a .icloud file from a shell in my mac
/Users/gcn/Library/Mobile Documents/com~apple~CloudDocs/Documents/workspace/nutmod/data-raw/NutrientData
I can query for the existence of the file with exists(xxx.icloud). But how do I tell my mac to download the iCloud file and then read it in? Using something like read.table or read.csv doesn't work because the pointer file is not csv.
You can read a csv file directly from a iCloud folder on the Mac by using the path to that folder. Get the path by finding it in the finder. Then right click on the filename at the bottom of the finder window where it shows all the folders leading to the file and choose: Copy "YourFile" as Pathname.
That path will look something like this:
"/Users/NAME/Library/Mobile
Documents/com~apple~CloudDoc/Docs/YourFile.csv"
Use that in your read code:
iCloudDat <- read_csv("/Users/NAME/Library/Mobile Documents/com~apple~CloudDocs/Documents/YourFileName.csv")
That should work.
If the extension isn't .txt or .csv read.table and read.csv won't work.
you have to download the file and extract the tables to a readable format.
you can download the file using download.file() which is is the utils basic library.
I am new to Syntaxnet. I followed the basic tutorial, installed syntaxnet and I modified the syntaxnet/demo.sh file and added the following code to context.pbtxt file:
input {
name: 'MAIN-IN'
record_format: 'english-text'
Part {
file_pattern:'/path_to_0095.txt'
}
}
This is helpful only to give the test.txt file as input, Now I want to give a folder of files, ex folder with 100 files as input and get it processed. I tried to give the folder as input which failed. I googled about it, but couldn't find anything useful. So Could any one please let me know how to process multiple files in a folder using syntaxnet ?
We built a Java program around SyntaxNet that dynamically updates the context.pbtxt file with the current file name (after pulling in all of the files in the directory). I don't know if SyntaxNet will allow you to use a directory of files as input.
I have this problem: I create a script in R that open a file xls in unix (I use read.xls from gdata) and it works, but if I open that file from windows I can't update it because "another user" is using that file. I couldn't find a function that "close" the connection to the file. Any suggestions?
I have an issue that I want to read a DOC file in my system but the condition is
Suppose you are working on browser and download some PDF or DOC file ,then my program should run and get the path of that file and convert that doc file in binary format.
the file download path may be change because some time it download in default folder but some times you saves that file in other locations.
my concern is this that code should execute at download time and should get file path from download history and read that file.