BookmarkSubscribeRSS Feed
cnwentsa
Calcite | Level 5

Hi. sory for this poor indentation. In the code below, I am having an issue (I am running SAS 9.1.3) . column kl does not exist in my dataset. is I keep it, my output file can be open with excel, having missing values on column kl. If I remove it, my output file will not open and promts an error indicating table. What can be the reason why removing this column creates a file that I cannot open with ms excel? ods tagsets.excelxp  options(sheet_name="LISTE"            gridlines="yes" orientation="landscape" panelcols="1"                embedded_titles="NO"                frozen_headers="YES"                frozen_headers="1" autofilter="yes"                filter_colls="_all_"                autofilter_table="1" row_heights="75"                autofit_heights="no"                );        proc report data=reftable.liste nowd ; column  actif Portefeuille  Conseiller  Poste majeure equipe ps Agregat Portefeuille kl ; define Portefeuille /style(header)=vertcl_header                                  style(column)=[just=center]; define equipe      /style(column)=[just=center] "Équipe"; define poste        /style(column)=[just=center] ;            define majeure      /style(column)=[just=center]; define ps          /style(column)=[just=center] format=fm_num.; define Agregat      /style(column)=[just=center] "Agrégat"; define actif      /computed style(column) ={tagattr='formula:=STRUCTURE_CAISSE!RC[0]'}; /* ;si(cherchev(RC[0];STRUCTURE_CAISSE!RC[0]:RC[0]);1;0) compute Actif; call define(_row_,"style","style={background=#ffffff}"); if actif eq 'X' then call define("actif","style","style={background=#99cc00}"); endcomp; */          run;  quit; Please note that I only have an issue when I remove the column kl from the column statement of the proc report. If this column is ketp, the output file does open with missing values for column kl as kl does not apear in the input dataset. thanks in advance.

1 REPLY 1
Reeza
Super User

That shouldn't be. 
Can you post the log from the code submitted?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 1 reply
  • 1340 views
  • 0 likes
  • 2 in conversation