On Jun 12, 5:39 am, "A.A.A" <ayaf...@[EMAIL PROTECTED]
> wrote:
--- snip ---
> And it works without errors but the problem is that I want to save
> the
> excel files so that the columns are with a certain order v1 then
> @[EMAIL PROTECTED]
then @[EMAIL PROTECTED]
(these are the names of the columns)so I
p=
ut
> after the save translate command
> the "keep" command as follows:
>
> SAVE TRANSLATE OUTFILE=3D!QUOTE(!concat('E:\simuldata1\', 'datag', !i,
> '.xls'))
>
> /TYPE=3DXLS /VERSION=3D8 /MAP /REPLACE /keep v1 @[EMAIL PROTECTED]
@[EMAIL PROTECTED]
v2 v3
> v4 v5 v6 V14_mean1 v7 V14_mean2 v8 V14_mean3 v9 V14_n.
>
> But unfortunately the excel files were saved without the order of
> columns I need: v1 then @[EMAIL PROTECTED]
then @[EMAIL PROTECTED]
where is
the
> problem??????????????????????????????
>
> Great thanks
Assuming there is no blank line in the middle of the SAVE TRANSLATE
command, I don't see any obvious problems. If you're not able to
figure out why it's not working as expected, you could always use
MATCH FILES (or ADD FILES) to rearrange the order of variables in the
working data file (and delete unwanted variables) before writing out
to Excel via SAVE TRANSLATE. That would look something like this:
match files file =3D * /
keep =3D v1 @[EMAIL PROTECTED]
@[EMAIL PROTECTED]
v2 v3 v4 v5 v6
V14_mean1 v7 V14_mean2 v8 V14_mean3 v9 V14_n .
exe.
SAVE TRANSLATE
OUTFILE=3D!QUOTE(!concat('E:\simuldata1\', 'datag', !i, '.xls')) /
TYPE=3DXLS /VERSION=3D8 /MAP /REPLACE .
By the way, when posting the same question to more than one group,
please cross-post rather than doing separate posts to the different
groups.
HTH.
--
Bruce Weaver
bweaver@[EMAIL PROTECTED]
"When all else fails, RTFM."


|