Search code examples
javascriptexcelexcel-formulaexcel-2010

separate japanese word inside js file using ms excel


the fastest way how to separate these js file and take japanese words inside JS form using ms excel.

I want to get the Japanese writing and delete the other writing and make it one sentence in excel, and then copied it into txt file, but the fastest and most possible way.

i also using Data-->Text to column --> delimited. but its too take long time.

{
  "wireMagic": "pb3",
  "pens": [ {
  
  } ],
  "wsWinStyles": [ {
  
  }, {
    "mhModeHint": 2,
    "juJustifCode": 0,
    "sdScrollDir": 3
  } ],
  "wpWinPositions": [ {
  
  }, {
    "apPoint": 6,
    "ahHorPos": 20,
    "avVerPos": 100,
    "rcRows": 2,
    "ccCols": 40
  } ],
  "events": [ {
    "tStartMs": 0,
    "dDurationMs": 2568980,
    "id": 1,
    "wpWinPosId": 1,
    "wsWinStyleId": 1
  }, {
    "tStartMs": 1380,
    "dDurationMs": 4579,
    "wWinId": 1,
    "segs": [ {
      "utf8": "ゆうゆう",
      "acAsrConf": 236
    }, {
      "utf8": "の日本",
      "tOffsetMs": 900,
      "acAsrConf": 236
    }, {
      "utf8": "語",
      "tOffsetMs": 1680,
      "acAsrConf": 236
    }, {
      "utf8": "ポッド",
      "tOffsetMs": 2100,
      "acAsrConf": 236
    }, {
      "utf8": "キャスト",
      "tOffsetMs": 2460,
      "acAsrConf": 234
    } ]
  }, {
    "tStartMs": 6110,
    "wWinId": 1,
    "aAppend": 1,
    "segs": [ {
      "utf8": "\n"
    } ]
  }, {
    "tStartMs": 6120,
    "dDurationMs": 4559,
    "wWinId": 1,
    "segs": [ {
      "utf8": "はい",
      "acAsrConf": 236
    }, {
      "utf8": "みな",
      "tOffsetMs": 480,
      "acAsrConf": 236
    }, {
      "utf8": "さん",
      "tOffsetMs": 659,
      "acAsrConf": 236
    }, {
      "utf8": "こんにちは",
      "tOffsetMs": 779,
      "acAsrConf": 236
    }, {
      "utf8": "ゆう",
      "tOffsetMs": 960,
      "acAsrConf": 236
    }, {
      "utf8": "の",
      "tOffsetMs": 1679,
      "acAsrConf": 236
    }, {
      "utf8": "日本",
      "tOffsetMs": 1920,
      "acAsrConf": 236
    }, {
      "utf8": "語",
      "tOffsetMs": 2280,
      "acAsrConf": 236
    } ]
  }

the fastest way seperate and get japanese writing using ms excel


Solution

  • Here you go: Paste your data into column A.

    Then, place this into cell B1 and fill down until the bottom of your data:

    =IFERROR(TEXTBEFORE(TEXTAFTER( IF(SEARCH("utf8",A1) > 0, A1), """", 3), """"), "")
    

    This concatenates the all of column B and removes blanks. I put mine in C1:

    =TEXTJOIN(" ", TRUE, B:B)
    

    This gives me: sample C1 content

    This solution ignores the newline characters, however! I am not certain if you need a solution that includes them. I expect this is a step in the right direction, however.

    For future JSON files, place your data into column A and collect the characters from C1.