Hi
Figured out an alternative way to execute Google Docs as EViews programs. Given a Google Document, such as,
- google docs.PNG (31.99 KiB) Viewed 8291 times
use the FILE ID and insert it in the following program
Code: Select all
%fileid= "1-T-3yjhYNJbwk3-8z_zf1afdGVo63iYLBM7TNeZybXY"
call googledocs(%fileid) 'executes the Google Doc as EViews program
'-------------------------------------------------------------------------------
subroutine googledocs(string %fileid)
%filename = "googledocs_may_be_deleted.txt" 'will be saved in @runpath folder
%dir=@runpath
'downloading google doc as txt file
%code1="wget https://docs.google.com/document/d/"
%code2="/export?format=txt -OutFile "
%code=%code1+%fileid+%code2+%dir+%filename
shell powershell -command {%code} 'downloading google doc file
'create txt file to execute program
%t=@getnextname("_t") 'txt file
text {%t} 'create text file
{%t}.append(file) {%dir}\{%filename}
{%t}.save {%dir}\googledocrunprogram.prg 'save text file as program
exec {%dir}\googledocrunprogram 'execute new program file
close {%t}
endsub
This way of doing it is a bit faster (takes 2,5 seconds instead of about 7 seconds when using the cloud connector in EViews) and Eviews will not unexpectedly shut down (
viewtopic.php?f=9&t=19330)
Thomas