I am currently new to Perl Scripting a detailed explanation would be helpful. I tried using the SAS Parser module but i guess it is for .sas files only. Please suggest which library to use for this task.
Asked
Active
Viewed 978 times
-2
-
1Show what you have tried, where you failed with errors etc. – Gerhard Nov 07 '17 at 06:24
-
1Umm, Gerhard is right. What are you trying to do? From the description It's either that you want to Perl your SAS or other way around. – pinegulf Nov 07 '17 at 06:36
-
@GerhardBarnard I have been trying to figure out the module required for conversion from xpt to Excel.I have 20 zipped xpt format files which I want to showcase in a BI Tool therefore I needed to convert those files to xls. Currently I have been started learning Perl and as the solution to the first step of my problem is not clear therefore I haven't been able to write the Script.I have tried using SAS Parser module for Perl but I guess that is only for .sas files.Kindly guide which module to use – Saumya Pandey Nov 07 '17 at 10:21
1 Answers
0
You can pass from xlsx to xpt with SAS easily following this example :
From XLSX to the XPT format :
options VALIDVARNAME=V6;
libname in xlsx "H:\desktop\XLSX\d.xlsx";
libname out xport "H:\desktop\test.xpt";
proc copy inlib=in outlib=out;
run;
libname in clear;
libname out clear;
From XPT to the XLSX format :
options VALIDVARNAME=V6;
libname out xlsx "H:\desktop\XLSX\d2.xlsx";
libname in xport "H:\desktop\test.xpt";
proc copy inlib=in outlib=out;
run;
libname in clear;
libname out clear;
It worked on my computer. Be careful because it truncate the column (due to the option VALIDVARNAME=V6).

Thogerar
- 339
- 1
- 7