BookmarkSubscribeRSS Feed
Manikanta
Calcite | Level 5

I began getting a pop-up box from Excel that says "Problems During Load". The pop-up box indicates that problems came up when loading the XML file, and that warnings have been written to a log file that is unfortunately in a hidden directory and inaccessible to me. 

 

Can you please anyone share the solution to resolve the issue ?

 

It will be helpful if you share the changes need to do on ODS tagets.excelxp.

 

%let XLS = &OutputPath.&CK..xls;

 

%Cdm_XLS(XLS = &XLS)

 

ods listing close;

ods tagsets.excelxp

  file="&XLS"

  STYLE=sas_xls

  OPTIONS (Orientation = 'landscape'

  embedded_titles = 'yes'

  row_repeat='header'

  FitToPage = 'Yes'

  Pages_FitWidth = '1'

  Pages_FitLength = '100'

  sheet_interval='none'

  sheet_name="&CK"

  default_column_width = "15,18"

  autofilter = 'all');

%let trans=;

 

proc sql noprint;

  select  _pt_ into :trans

    from &CK;

quit;

 

/*  Force output width to allow headers to display correctly */

data message;

  infile "/macros/NO_RECORDS_MEET_CRITERION.txt" dlm = '|';

  input message $85.

  ;

run;

 

%macro print;

  title2 bold "&StudyDesc";

  title3 bold "&Check";

  title4 bold "&TT1";

  title5 bold "&TT2";

  title6 bold" &TT3";

 

  %if &trans ne %then

    %do;

      %if &trans = WITH DATA ZERO RECORDS %then

        %do;

 

          proc print data=&ck(drop=_pt_) noobs;

          run;

 

        %end;

      %else %if &trans = NODATA %then

        %do;

 

          proc print data=&ck(drop=_pt_) noobs;

          run;

 

        %end;

      %else %if &trans = DATA WITH MISSING VARIABLES %then

        %do;

 

          proc print data=&ck(drop=_pt_ ERRORS_AND_WARNINGS) noobs;

          run;

 

        %end;

      %else

        %do;

 

          proc report data=&CK split="/" missing nowindows headline;

            column id name;

          run;

 

        %end;

    %end;

  %else

    %do;

 

      proc print data=message noobs;

      run;

 

    %end;

%mend print;

 

%print;

ods tagsets.excelxp close;

ods listing;

2 REPLIES 2
Kurt_Bremser
Super User

TAGSETS.EXCELXP does NOT create files according to the .xls format, but XML text. Name your file correctly with a .xml extension.

Newer Excel versions complain when the contents of a file do not match the extension.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Its going to be very hard to debug from there.  Provide a working example, i.e. give us some test data in the form of a datastep so that we can run the code.  Is it possible that the data doesn't exist, has strange data, template has incorrect values, is greater than excel can handle etc.  The log might help as well.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1231 views
  • 0 likes
  • 3 in conversation