Hi,
i want create a xml file with this code:
ODS TAGSETS.EXCELXP file="C:\Users\ui43925\Desktop\PROVA\&FILE."
style=printer
OPTIONS ( Center_Horizontal = 'yes'
Embedded_Titles = 'yes'
Embedded_Footnotes = 'no'
Sheet_Name = 'Elenco terminali'
/* Absolute_Column_Width = 'NONE' */
Center_Horizontal = 'yes'
Autofit_Height = 'yes'
/*Frozen_Headers = '6' */
width_fudge='2.2'
/* default_column_width='3' */
Autofilter = 'yes'
absolute_column_width= '5,4,3,7,7,5,3,3,7,7,2,7,2,3,4'
);
options missing=' ';
TITLE1 font=calibri h=5 "TERMINALI IN DOTAZIONE ALL'AGENZIA";
/*TITLE2 '(Richieste totali pervenute - Interazioni con operatore)'; */
proc report nowd data=WORKUSI.OUT_TEMP1;
COLUMN
REGION KEYATM COD_AG AGENZIA DESCRIZIONE_PRESSO TIPO_UBICAZIONE TIPOLOGIA_TERMINALE MODELLO_TERMINALE INDIRIZZO
COMUNE PRO REGIONE CAP BARCODE_SI_NO DATA_ATTIVAZIONE_BARCODE;
define DATA_ATTIVAZIONE_BARCODE / FORMAT=DDMMYY10.;
define KEYATM / FORMAT=$15.;
run;
ODS TAGSETS.EXCELXP CLOSE;
The problem is the column KEYATM:
define KEYATM / FORMAT=$15.;
in the file xml i have a number format and not text
What is the problem ? I need text 020082230007073 ....
Thanks!!!!
What you are generating is XML, Excel is then interpreting this XML upon opening an rendering it as it sees fit - as no format is specified in the XML, Excel says look a number, let me be helpfull and display as a number. To get round this you need to supply the XML with the Excel format for that column. Here is a document which comes up first on the search and explains it:
http://support.sas.com/resources/papers/proceedings13/316-2013.pdf
What you are generating is XML, Excel is then interpreting this XML upon opening an rendering it as it sees fit - as no format is specified in the XML, Excel says look a number, let me be helpfull and display as a number. To get round this you need to supply the XML with the Excel format for that column. Here is a document which comes up first on the search and explains it:
http://support.sas.com/resources/papers/proceedings13/316-2013.pdf
can I not see this message at every export ?
I can't see where you are running that so I can only guess here. There is an option:
options noresults;
Or
options results;
The first will turn off the feature which automatically opens any output your program creates - so put that in your program before you create the file.
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!
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.