Help using Base SAS procedures

import excel with three worksheets

Reply
Contributor
Posts: 32

import excel with three worksheets

Hi,

I need to import the excel with three woroksheets and and in the inported worksheet i need to make one cell as dynamic so when i run the code daily automatically the cell for that day should be filled with data. and aslo,

I tried importing with proc import ,but i get a error telling file_imex_error.

so anyone help me in this please?

Thanks

Respected Advisor
Posts: 4,649

import excel with three worksheets

Do you wish to read cell values dynamically updated by Excel or to dynamically update Excel cells with SAS?

PG
Contributor
Posts: 32

import excel with three worksheets

I need to upadate excel cells by sas

PROC Star
Posts: 7,363

import excel with three worksheets

It would help if you had posted your log, but the error may simply be that you didn't specify the file and/or sheet names correctly.  As for your other questions, like PGStats mentioned, the forum would need to know more about what you are trying to accomplish.

Contributor
Posts: 32

import excel with three worksheets

o, its like the excel format is different i guess,so when i try to import the excel with correct sheet name,its showing error as FILE_IMEX error.

I tried importing it using import wizard but still the same error exists,

I tried giving the rangein the proc import like

sheet="sheet1A1:A10$"n but its not working

It would be helpfull,if you guide me with some other way of giving sheet name.

Thanks

Respected Advisor
Posts: 4,649

import excel with three worksheets

Try this syntax:

libname xl excel "c:\yourpath\.yourFile.xlsx" getnames=no;

proc print data=xl."Sheet1$A1:A2"n; run;

libname xl clear;

PG

PG
Contributor
Posts: 32

import excel with three worksheets

Hi,

I am able to import the excel sheet successfully.

But i need to read an one row number for example:-23 and assign it to one macro,so that when i run everyday it should update for the current day.

How can i achieve this?

Thanks

PROC Star
Posts: 7,363

import excel with three worksheets

Back to the original questions: what do you have to read in (i.e., what field(s)/column(s)) and what do you have to update (i.e., a sas file or the spreadsheet)?

Contributor
Posts: 32

import excel with three worksheets

I imported the excel file to sas and now i have a sas dataset.

example:

data      today tom  dayafter

d            1       2      3

e            4      7       9

Now i need to read the row 'd' and assign it to one macro so that when i run today it will upadate the row.

This updation i need to do in excel..

Thanks

Ask a Question
Discussion stats
  • 8 replies
  • 169 views
  • 0 likes
  • 3 in conversation