BookmarkSubscribeRSS Feed
SAS_PA1
Calcite | Level 5

I have XLS file sheet 1 and sheet 2, sheet 1 has Image content and sheet 2 has data, I am trying use it using SFTP and copy it to other location/server, Image content getting corrupted when read  copied to other location, please help me in reading Image tab using SAS.

6 REPLIES 6
SuryaKiran
Meteorite | Level 14

Why don't you use WinSCP or similar open source FTP if you just want to copy files. If your using SAS to import/export file then I don't this image file can be handled by SAS.

Thanks,
Suryakiran
SAS_PA1
Calcite | Level 5

file name

expfile ref ftp  "& file.xls"  cd= path

 

 

When I am copying file to this location , its getting corrupted as the Xls file 1st tab has image file in it, please let me know if I can Use ODS to read the Image file. Thank you.

data _null_;
infile expfile NBYTE=n;
INPUT;
file "/serverpath/file.xls" recfm=n;
put _INFILE_ @@;
run;

SAS_PA1
Calcite | Level 5

Hi

 

I have to read/copy the  XLS file Sheet 1 having image content and sheet 2 having  records from source location, copy it to destination Location, while copying xls file at destination(SAS Server) the file getting corrupted, please could any one help me

 

 

 

file name

expfile ref ftp  "& file.xls"  cd= path

 

 

data _null_;
infile expfile NBYTE=n;
INPUT;
file "/serverpath/file.xls" recfm=n;
put _INFILE_ @@;
run;

SAS_PA1
Calcite | Level 5

SFTP code working fine but Image Xls file is getting copied to destination web  server, but XLS file getting corrupted as   it couldn't read imagetab.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1669 views
  • 0 likes
  • 3 in conversation