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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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