- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-19-2011 08:33 AM
(2519 views)
Hi Everyone
I am working on SAS enterprise Guide in WINDOWS XP environment.
As part of my automation work, I need to convert some of the excel files (.xls, .xlsx) to .csv files due to some issues in handling .xls and .xlsx files directly.
Do you know any way in SAS using which I can convert file in one extension to another - of course as per the operating environment which in my case is XP?
Appreciate your co-operation.
Thanks
Shankar
I am working on SAS enterprise Guide in WINDOWS XP environment.
As part of my automation work, I need to convert some of the excel files (.xls, .xlsx) to .csv files due to some issues in handling .xls and .xlsx files directly.
Do you know any way in SAS using which I can convert file in one extension to another - of course as per the operating environment which in my case is XP?
Appreciate your co-operation.
Thanks
Shankar
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That is easy.Assuming all your xls file in c:\temp
[pre]
filename csv pipe 'dir c:\temp\*.xls* /b';
data _null_;
file 'c:\rename.bat';
infile csv length=len;
input name $varying100. len;
str='rename '||strip(name)||' '||strip(scan(name,1,'.'))||'.csv';
put str;
run;
x 'c:\rename.bat';
x 'del c:\rename.bat';
run;
[/pre]
Ksharp
[pre]
filename csv pipe 'dir c:\temp\*.xls* /b';
data _null_;
file 'c:\rename.bat';
infile csv length=len;
input name $varying100. len;
str='rename '||strip(name)||' '||strip(scan(name,1,'.'))||'.csv';
put str;
run;
x 'c:\rename.bat';
x 'del c:\rename.bat';
run;
[/pre]
Ksharp
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That is just going to rename them, not convert them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Maybe you need to use Google to search some software which can convert xls into csv automatically.
Ksharp
Ksharp