BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Felix_
Obsidian | Level 7

Hi Folks,

I have a Special issue regarding japanese characters. I am importing an .xlsx sheet, looking like this:

Unbenannt.JPG 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:

 

Unbenannt2.JPG as soon as i click on the cell, having the invalid character "施設伝達対象外", the Content disappears. see following screenshot:

Unbenannt3.JPG 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

1 ACCEPTED SOLUTION

Accepted Solutions
Felix_
Obsidian | Level 7

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

View solution in original post

2 REPLIES 2
Ksharp
Super User

Maybe there is a half of Janpanese character.and occur this kind of error .

 

Did you try

PROC EXPORT 

or

ODS TAGSET.EXCELXP ?

Felix_
Obsidian | Level 7

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 1838 views
  • 0 likes
  • 2 in conversation