Sporadic error in exporting to excel
Posted: Wed Jul 13, 2016 8:39 am
Dear Forum users,
When running the routine below to extract data into excel, I get sporadic errors saying that the target file does not exist or eviews stops working altogether, Running the program again more often than not the error vanishes. This is a problem because getting to the results is quite time consuming.
Is there something in the routine that is confusing eviews?
many thanks for your help
Michele
When running the routine below to extract data into excel, I get sporadic errors saying that the target file does not exist or eviews stops working altogether, Running the program again more often than not the error vanishes. This is a problem because getting to the results is quite time consuming.
Is there something in the routine that is confusing eviews?
many thanks for your help
Michele
Code: Select all
'-------------------------------------------------------
' 4.1 EXPORT 1
'-------------------------------------------------------
vector(7) percentiles 'Store percentiles to extract
percentiles.fill 10, 20, 40, 50, 60, 80, 90 'Define percentiles of interest
'Export replications
for %s bl ub lb
for %perc dgdp pbgdp ints intlm spread intlnm i_eff iegdp rgy piy w
group g_{%s}_{%perc} 'Group to store results
for %d ps ts
for !i = 1 to @rows(percentiles)
!j = percentiles(!i)
g_{%s}_{%perc}.add {%d}_{%s}_{%perc}_perc_!j
next
next
wfsave(type=excelxml, mode=update) "Myfile1.xlsx" range={%s}_{%perc} @smpl {%firstp}-4 {%lastp} @keep {%s}_{%perc}_0 g_{%s}_{%perc}
next
next
'-------------------------------------------------------
' 4.2 EXPORT 2
'-------------------------------------------------------
group g_baseline
group g_dgdp
for %s bl ub lb
g_baseline.add {%s}_dgdp_0 {%s}_pbgdp_0 {%s}_iegdp_0 {%s}_intlnm_0 {%s}_i_eff_0 {%s}_w_0
g_dgdp.add g_{%s}_dgdp
next
for %group g_baseline g_dgdp
wfsave(type=excelxml, mode=update) "Myfile2.xlsx" range={%group} @smpl {%firstp}-4 {%lastp} @keep {%group}
next