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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1183 views
  • 0 likes
  • 3 in conversation