<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.planetoid.info/index.php?action=history&amp;feed=atom&amp;title=Convert_number_to_chinese_words</id>
	<title>Convert number to chinese words - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.planetoid.info/index.php?action=history&amp;feed=atom&amp;title=Convert_number_to_chinese_words"/>
	<link rel="alternate" type="text/html" href="https://wiki.planetoid.info/index.php?title=Convert_number_to_chinese_words&amp;action=history"/>
	<updated>2026-08-04T14:37:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.planetoid.info/index.php?title=Convert_number_to_chinese_words&amp;diff=22574&amp;oldid=prev</id>
		<title>Unknown user: /* Related */</title>
		<link rel="alternate" type="text/html" href="https://wiki.planetoid.info/index.php?title=Convert_number_to_chinese_words&amp;diff=22574&amp;oldid=prev"/>
		<updated>2022-02-19T12:39:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Related&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:39, 19 February 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l56&quot;&gt;Line 56:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://github.com/digi3studio/number-to-chinese-words digi3studio/number-to-chinese-words: Convert a number to chinese words. 由數字轉為中文數目]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://github.com/digi3studio/number-to-chinese-words digi3studio/number-to-chinese-words: Convert a number to chinese words. 由數字轉為中文數目]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://stackoverflow.com/questions/71138491/how-can-i-replace-multiple-string-at-once-in-excel How can I replace multiple string at once in Excel? - Stack Overflow]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://stackoverflow.com/questions/71138491/how-can-i-replace-multiple-string-at-once-in-excel How can I replace multiple string at once in Excel? - Stack Overflow]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://www.ablebits.com/office-addins-blog/2021/06/30/excel-find-replace-multiple-values/ Excel: find and replace multiple values at once - Ablebits.com]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Unknown user</name></author>
	</entry>
	<entry>
		<id>https://wiki.planetoid.info/index.php?title=Convert_number_to_chinese_words&amp;diff=22573&amp;oldid=prev</id>
		<title>Unknown user: Created page with &quot;將數字轉換成中文國字大寫  == Convert number to Chinese words in Excel ==  &lt;pre&gt; =TEXT(A1,&quot;[DBNUM2]0億0仟萬0佰萬0拾萬0萬0仟0佰0拾0元&quot;) &lt;/pre&gt;  == Conver...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.planetoid.info/index.php?title=Convert_number_to_chinese_words&amp;diff=22573&amp;oldid=prev"/>
		<updated>2022-02-19T12:09:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;將數字轉換成中文國字大寫  == Convert number to Chinese words in Excel ==  &amp;lt;pre&amp;gt; =TEXT(A1,&amp;quot;[DBNUM2]0億0仟萬0佰萬0拾萬0萬0仟0佰0拾0元&amp;quot;) &amp;lt;/pre&amp;gt;  == Conver...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;將數字轉換成中文國字大寫&lt;br /&gt;
&lt;br /&gt;
== Convert number to Chinese words in Excel ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=TEXT(A1,&amp;quot;[DBNUM2]0億0仟萬0佰萬0拾萬0萬0仟0佰0拾0元&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Convert number to Chinese words in Google sheet ==&lt;br /&gt;
Source of formula: PTT&amp;lt;ref&amp;gt;[https://www.ptt.cc/bbs/Office/M.1644921987.A.FA8.html Re: (問題) google sheet 數字轉中文大寫 - 看板 Office - 批踢踢實業坊]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(A1,&amp;quot;0億0仟0佰0拾0萬0仟0佰0拾0元&amp;quot;),&amp;quot;1&amp;quot;,&amp;quot;壹&amp;quot;),&amp;quot;2&amp;quot;,&amp;quot;貳&amp;quot;),&amp;quot;3&amp;quot;,&amp;quot;參&amp;quot;),&amp;quot;4&amp;quot;,&amp;quot;肆&amp;quot;),&amp;quot;5&amp;quot;,&amp;quot;伍&amp;quot;),&amp;quot;6&amp;quot;,&amp;quot;陸&amp;quot;),&amp;quot;7&amp;quot;,&amp;quot;柒&amp;quot;),&amp;quot;8&amp;quot;,&amp;quot;捌&amp;quot;),&amp;quot;9&amp;quot;,&amp;quot;玖&amp;quot;),&amp;quot;0&amp;quot;,&amp;quot;零&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apps script version&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function NUMBER2HANS(input) {&lt;br /&gt;
&lt;br /&gt;
  let numbers = &amp;#039;0123456789&amp;#039;&lt;br /&gt;
  let hans = &amp;#039;零壹貳參肆伍陸柒捌玖&amp;#039;&lt;br /&gt;
  const hans_digits = [&amp;#039;元&amp;#039;, &amp;#039;拾&amp;#039;, &amp;#039;佰&amp;#039;, &amp;#039;仟&amp;#039;, &amp;#039;萬&amp;#039;, &amp;#039;拾萬&amp;#039;, &amp;#039;佰萬&amp;#039;, &amp;#039;仟萬&amp;#039;, &amp;#039;億&amp;#039;]&lt;br /&gt;
  //input = input.trim()&lt;br /&gt;
  //input = input.replace(/^\s+|\s+$/gm,&amp;#039;&amp;#039;);&lt;br /&gt;
  let length = input.length;&lt;br /&gt;
  //console.log(&amp;quot;length: &amp;quot; + length);&lt;br /&gt;
&lt;br /&gt;
  // javascript - How can I pad a value with leading zeros? - Stack Overflow https://stackoverflow.com/questions/1267283/how-can-i-pad-a-value-with-leading-zeros&lt;br /&gt;
  maxLength = 9; // maxLength is the max string length, not max # of fills&lt;br /&gt;
  input = input.toString().padStart(maxLength, &amp;quot;0&amp;quot;);&lt;br /&gt;
  length = input.length;&lt;br /&gt;
&lt;br /&gt;
  let output = &amp;#039;&amp;#039;&lt;br /&gt;
  for (let i = 0; i &amp;lt; input.length; i++) {&lt;br /&gt;
    let currentDigit = length - i - 1;&lt;br /&gt;
    //console.log(&amp;quot;currentDigit: &amp;quot; + currentDigit);&lt;br /&gt;
    let currentHansDigit = hans_digits[currentDigit];&lt;br /&gt;
    //console.log(&amp;quot;currentHansDigit: &amp;quot; + currentHansDigit);&lt;br /&gt;
      &lt;br /&gt;
    let currentChar = input.charAt(i) &lt;br /&gt;
    //console.log(&amp;quot;currentChar: &amp;quot; + currentChar);&lt;br /&gt;
    &lt;br /&gt;
    let currentHans = hans.charAt(currentChar) &lt;br /&gt;
    //console.log(&amp;quot;currentHans: &amp;quot; + currentHans);&lt;br /&gt;
    //let output = currentHans + currentHansDigit&lt;br /&gt;
    output += currentHans + currentHansDigit&lt;br /&gt;
    //console.log(&amp;quot;output: &amp;quot; + output); &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return output&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related ==&lt;br /&gt;
* [https://chinese.gratis/tools/chinesenumbers/ Chinese Number Conversion (Online Converter) | Chinese Gratis] in simplified Chinese&lt;br /&gt;
* [https://github.com/digi3studio/number-to-chinese-words digi3studio/number-to-chinese-words: Convert a number to chinese words. 由數字轉為中文數目]&lt;br /&gt;
* [https://stackoverflow.com/questions/71138491/how-can-i-replace-multiple-string-at-once-in-excel How can I replace multiple string at once in Excel? - Stack Overflow]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Spreadsheet]] [[Category:Excel]]&lt;br /&gt;
[[Category:Data Science]]&lt;br /&gt;
[[Category:String manipulation]]&lt;/div&gt;</summary>
		<author><name>Unknown user</name></author>
	</entry>
</feed>