BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vivekvardhan_1
Calcite | Level 5

Hi Every one . can any one help me out in this issue .

i have to import excel sheet into data set (large data set),

every week same excel sheet get updated .(increases to number of rows or columns )

i need to find out updated part in excel sheet

yes  compare with previous data set i can get that .

My Question :?

Here i need to generate excel sheet all rows and columns with updated part (rows ) in yellow color .

1 ACCEPTED SOLUTION

Accepted Solutions
vivekvardhan_1
Calcite | Level 5

Hi plz find the below answer for diffrentiation of data with excel output using ods output .

ODS TAGSETS.EXCELXP PATH="D:\GSKBIO\USERS\SSP\VARDHAN\Histo pCR" FILE="&out..xls" STYLE=sansPrinter;

PROC REPORT DATA= sashelp.classNOWD;

COLUMN _ALL_ ;

COLUMN zebrarows ;

  DEFINE zebrarows / COMPUTED NOPRINT;

  COMPUTE zebrarows ;

    IF sex= "M"  THEN

    CALL DEFINE (_ROW_ ,'STYLE', 'STYLE=[BACKGROUND=#e0ffff]' );

  ENDCOMP;

RUN;

ODS TAGSETS.ExcelXP CLOSE;

yes its work for 9.2 and above versions only .

this code  generates data as i expected , thanks to every one .

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

Well firstly, the problem you are facing is that you are using Excel,  Its a simple as that really.  Over the last 20-30 years or so some very clever people have been developing tools specifically designed for tasks like these, they are called databases.  Now what you are asking to do is to have Excel do the same as this, even though it was not designed for such a thing.  So, you first need to decide where the processing for this would take place, you can either keep a SAS import of the spreadsheet, import any new data, check updates, then export the data out again, or use VBA macros in Excel.  Either way you will be basically writing code to emulate the various functions of a database.  I.e. you mention that there will be updates.  What does this entail, new records, deleted records, updated records.  What identifiers are in place so that you can identify unique records.  What audit trail functionality would need to be in place.  What user access is necessary.  If you are in my industry and this is used for critical data then you need to read up on CFR-part 11 compliance etc.

My suggestion, drop Excel as its useless.  Start out by identifying what you want to acheive, what is available as a tool to over the task.  Speak to your IT about current implementations etc.  Unless you go through proper channels of SDLC, implementation, and using correct guidelines, all you will end up with is an unstable, unvalidated tool which will cause you more headaches along the line.

vivekvardhan_1
Calcite | Level 5

Hi plz find the below answer for diffrentiation of data with excel output using ods output .

ODS TAGSETS.EXCELXP PATH="D:\GSKBIO\USERS\SSP\VARDHAN\Histo pCR" FILE="&out..xls" STYLE=sansPrinter;

PROC REPORT DATA= sashelp.classNOWD;

COLUMN _ALL_ ;

COLUMN zebrarows ;

  DEFINE zebrarows / COMPUTED NOPRINT;

  COMPUTE zebrarows ;

    IF sex= "M"  THEN

    CALL DEFINE (_ROW_ ,'STYLE', 'STYLE=[BACKGROUND=#e0ffff]' );

  ENDCOMP;

RUN;

ODS TAGSETS.ExcelXP CLOSE;

yes its work for 9.2 and above versions only .

this code  generates data as i expected , thanks to every one .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1108 views
  • 0 likes
  • 2 in conversation