Hi Folks,
I have a Special issue regarding japanese characters. I am importing an .xlsx sheet, looking like this:
via a macro, we've built in this comany, using:
/*read Excel file*/
PROC IMPORT DATAFILE = "&p_sInFile."
OUT = &l_sThismacro._1
DBMS = XLSX REPLACE;
SHEET = "&p_sSheetName";
GETNAMES = NO;
DATAROW = &p_nDataRow.;
RUN;
This works out, and i get as a result a sas-dataset looking like that:
as soon as i click on the cell, having the invalid character "施設伝達対象外", the Content disappears. see following screenshot:
All other (japanese only a few) characters in this sheet do not make Problems but the string mentioned above. Especially when using an Export procedure ODS-Excel / PROC REPORT i get the error:
NOTE: Multiple concurrent threads will be used to summarize data.
ERROR: Invalid characters were present in the data.
ERROR: An error occurred while processing text data.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 24 observations read from the data set WORK.DER_DATA_AMG162.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.52 seconds
cpu time 0.51 seconds
Any ideas how to solve this issue with printing the erroneous string into an .xlsx file?
Thank you in advance & best regards,
Felix
What i did is expanding the Format of the column ... from $20. to $50. that was the solution. It seems that representation of the mentioned japanese-characters takes not 7 characters (if you Count it simply) but 21 in total.
-> So it was actually a Format issue. Problem solved
Maybe there is a half of Janpanese character.and occur this kind of error .
Did you try
PROC EXPORT
or
ODS TAGSET.EXCELXP ?
What i did is expanding the Format of the column ... from $20. to $50. that was the solution. It seems that representation of the mentioned japanese-characters takes not 7 characters (if you Count it simply) but 21 in total.
-> So it was actually a Format issue. Problem solved
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.