excel file copy from windows to unix

Reply
Occasional Contributor
Posts: 8

excel file copy from windows to unix

Hi -

Iam getting input files in excel format into my local machine. Every time I am manually copying files into UNIX box using winscp tool. I am doing this because Sas eg is configured on UNIX.

Is there a way to read files from windows(local) from Sas Eg which is connected to UNIX.??

Thanks in advance!!

Durga.

Respected Advisor
Posts: 4,130

Re: excel file copy from windows to unix

Manually yes using the EG import wizard.

Frequent Contributor
Posts: 117

Re: excel file copy from windows to unix

Yes, either manually via file import or you could have a look here:

http://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/

Contributor
Posts: 61

Re: excel file copy from windows to unix

Here are the only two options I can think of. Both involve installing software.

Try looking at SAS/Access (this solution would be installed on your local machine - closest to what you're looking for I think)

http://www.sas.com/en_us/software/data-management/access.html

You can also look at implementing Samba on the UNIX system. (this would be installed on the UNIX server and you'd have to configure it to connect to your local machine).

https://www.samba.org/

Occasional Contributor
Posts: 8

Re: excel file copy from windows to unix

Thank You for the response.

Here is my actual requirement.

Steps:

1) I get my input files in local machine(windows)

2) Need to run VBA code to read multiple input file and make one file

3) Need to read input file from SAS EG( from Unix env)

4) run some sas logic and create  output Excel file

5) export into windows and run vba code to format the report

6) Send report in email as attachment.

currently we are doing this steps manually. Now i would need to automate it.

Since i am using SAS EG i am struggling to copy files from windows to unix automatically vice versa .Another issue is DDE is not working in SAS EG to run VBA codes.

Can any one help me on this to understand the best possible solution.

Thanks.

Contributor
Posts: 61

Re: excel file copy from windows to unix

Based on what you're telling me I think you may go another route.

I also use the Putty suite of applications. Two components that would play a role in what you want to do is PLINK (to send a script to execute) and PSCP to copy files. Since the beginning and end of your process requires VBA then I think it's best to create a BAT file that will do the following: execute the VBA script in #2, transfer the files using PSCP for #3, execute the SAS logic (.sas file) using PLINK to transfer and execute an shell script from your machine for #4, download the exported Excel file using PSCP for #5 and execute the VBA code, and finally for #6 I would hope you can email the end result using VBA.

http://www.chiark.greenend.org.uk/~sgtatham/putty/

Minus the VBA components I use the above process every week.

Ask a Question
Discussion stats
  • 5 replies
  • 1282 views
  • 3 likes
  • 4 in conversation