货币格式

Excelize 目前支持的货币格式索引如下表所示,索引号仅用于标记,不在 Office Excel 文件中使用,目前无法通过函数 GetCellValue 获取格式化值后的值。

索引货币格式
164CN¥
165$ English (China)
166$ Cherokee (United States)
167$ Chinese (Singapore)
168$ Chinese (Taiwan)
169$ English (Australia)
170$ English (Belize)
171$ English (Canada)
172$ English (Jamaica)
173$ English (New Zealand)
174$ English (Singapore)
175$ English (Trinidad & Tobago)
176$ English (U.S. Vigin Islands)
177$ English (United States)
178$ French (Canada)
179$ Hawaiian (United States)
180$ Malay (Brunei)
181$ Quechua (Ecuador)
182$ Spanish (Chile)
183$ Spanish (Colombia)
184$ Spanish (Ecuador)
185$ Spanish (El Salvador)
186$ Spanish (Mexico)
187$ Spanish (Puerto Rico)
188$ Spanish (United States)
189$ Spanish (Uruguay)
190£ English (United Kingdom)
191£ Scottish Gaelic (United Kingdom)
192£ Welsh (United Kindom)
193¥ Chinese (China)
194¥ Japanese (Japan)
195¥ Sichuan Yi (China)
196¥ Tibetan (China)
197¥ Uyghur (China)
198֏ Armenian (Armenia)
199؋ Pashto (Afghanistan)
200؋ Persian (Afghanistan)
201৳ Bengali (Bangladesh)
202៛ Khmer (Cambodia)
203₡ Spanish (Costa Rica)
204₦ Hausa (Nigeria)
205₦ Igbo (Nigeria)
206₦ Yoruba (Nigeria)
207₩ Korean (South Korea)
208₪ Hebrew (Israel)
209₫ Vietnamese (Vietnam)
210€ Basque (Spain)
211€ Breton (France)
212€ Catalan (Spain)
213€ Corsican (France)
214€ Dutch (Belgium)
215€ Dutch (Netherlands)
216€ English (Ireland)
217€ Estonian (Estonia)
218€ Euro (€ 123)
219€ Euro (123 €)
220€ Finnish (Finland)
221€ French (Belgium)
222€ French (France)
223€ French (Luxembourg)
224€ French (Monaco)
225€ French (Réunion)
226€ Galician (Spain)
227€ German (Austria)
228€ German (Luxembourg)
229€ Greek (Greece)
230€ Inari Sami (Finland)
231€ Irish (Ireland)
232€ Italian (Italy)
233€ Latin (Italy)
234€ Latin, Serbian (Montenegro)
235€ Larvian (Latvia)
236€ Lithuanian (Lithuania)
237€ Lower Sorbian (Germany)
238€ Luxembourgish (Luxembourg)
239€ Maltese (Malta)
240€ Northern Sami (Finland)
241€ Occitan (France)
242€ Portuguese (Portugal)
243€ Serbian (Montenegro)
244€ Skolt Sami (Finland)
245€ Slovak (Slovakia)
246€ Slovenian (Slovenia)
247€ Spanish (Spain)
248€ Swedish (Finland)
249€ Swiss German (France)
250€ Upper Sorbian (Germany)
251€ Western Frisian (Netherlands)
252₭ Lao (Laos)
253₮ Mongolian (Mongolia)
254₮ Mongolian, Mongolian (Mongolia)
255₱ English (Philippines)
256₱ Filipino (Philippines)
257₴ Ukrainian (Ukraine)
258₸ Kazakh (Kazakhstan)
259₹ Arabic, Kashmiri (India)
260₹ English (India)
261₹ Gujarati (India)
262₹ Hindi (India)
263₹ Kannada (India)
264₹ Kashmiri (India)
265₹ Konkani (India)
266₹ Manipuri (India)
267₹ Marathi (India)
268₹ Nepali (India)
269₹ Oriya (India)
270₹ Punjabi (India)
271₹ Sanskrit (India)
272₹ Sindhi (India)
273₹ Tamil (India)
274₹ Urdu (India)
275₺ Turkish (Turkey)
276₼ Azerbaijani (Azerbaijan)
277₼ Cyrillic, Azerbaijani (Azerbaijan)
278₽ Russian (Russia)
279₽ Sakha (Russia)
280₾ Georgian (Georgia)
281B/. Spanish (Panama)
282Br Oromo (Ethiopia)
283Br Somali (Ethiopia)
284Br Tigrinya (Ethiopia)
285Bs Quechua (Bolivia)
286Bs Spanish (Bolivia)
287BS. Spanish (Venezuela)
288BWP Tswana (Botswana)
289C$ Spanish (Nicaragua)
290CA$ Latin, Inuktitut (Canada)
291CA$ Mohawk (Canada)
292CA$ Unified Canadian Aboriginal Syllabics, Inuktitut (Canada)
293CFA French (Mali)
294CFA French (Senegal)
295CFA Fulah (Senegal)
296CFA Wolof (Senegal)
297CHF French (Switzerland)
298CHF German (Liechtenstein)
299CHF German (Switzerland)
300CHF Italian (Switzerland)
301CHF Romansh (Switzerland)
302CLP Mapuche (Chile)
303CN¥ Mongolian, Mongolian (China)
304DZD Central Atlas Tamazight (Algeria)
305FCFA French (Cameroon)
306Ft Hungarian (Hungary)
307G French (Haiti)
308Gs. Spanish (Paraguay)
309GTQ K'iche' (Guatemala)
310HK$ Chinese (Hong Kong (China))
311HK$ English (Hong Kong (China))
312HRK Croatian (Croatia)
313IDR English (Indonesia)
314IQD Arbic, Central Kurdish (Iraq)
315ISK Icelandic (Iceland)
316K Burmese (Myanmar (Burma))
317Kč Czech (Czech Republic)
318KM Bosnian (Bosnia & Herzegovina)
319KM Croatian (Bosnia & Herzegovina)
320KM Latin, Serbian (Bosnia & Herzegovina)
321kr Faroese (Faroe Islands)
322kr Northern Sami (Norway)
323kr Northern Sami (Sweden)
324kr Norwegian Bokmål (Norway)
325kr Norwegian Nynorsk (Norway)
326kr Swedish (Sweden)
327kr. Danish (Denmark)
328kr. Kalaallisut (Greenland)
329Ksh Swahili (kenya)
330L Romanian (Moldova)
331L Russian (Moldova)
332L Spanish (Honduras)
333Lekë Albanian (Albania)
334MAD Arabic, Central Atlas Tamazight (Morocco)
335MAD French (Morocco)
336MAD Tifinagh, Central Atlas Tamazight (Morocco)
337MOP$ Chinese (Macau (China))
338MVR Divehi (Maldives)
339Nfk Tigrinya (Eritrea)
340NGN Bini (Nigeria)
341NGN Fulah (Nigeria)
342NGN Ibibio (Nigeria)
343NGN Kanuri (Nigeria)
344NOK Lule Sami (Norway)
345NOK Southern Sami (Norway)
346NZ$ Maori (New Zealand)
347PKR Sindhi (Pakistan)
348PYG Guarani (Paraguay)
349Q Spanish (Guatemala)
350R Afrikaans (South Africa)
351R English (South Africa)
352R Zulu (South Africa)
353R$ Portuguese (Brazil)
354RD$ Spanish (Dominican Republic)
355RF Kinyarwanda (Rwanda)
356RM English (Malaysia)
357RM Malay (Malaysia)
358RON Romanian (Romania)
359Rp Indonesoan (Indonesia)
360Rs Urdu (Pakistan)
361Rs. Tamil (Sri Lanka)
362RSD Latin, Serbian (Serbia)
363RSD Serbian (Serbia)
364RUB Bashkir (Russia)
365RUB Tatar (Russia)
366S/. Quechua (Peru)
367S/. Spanish (Peru)
368SEK Lule Sami (Sweden)
369SEK Southern Sami (Sweden)
370soʻm Latin, Uzbek (Uzbekistan)
371soʻm Uzbek (Uzbekistan)
372SYP Syriac (Syria)
373THB Thai (Thailand)
374TMT Turkmen (Turkmenistan)
375US$ English (Zimbabwe)
376ZAR Northern Sotho (South Africa)
377ZAR Southern Sotho (South Africa)
378ZAR Tsonga (South Africa)
379ZAR Tswana (south Africa)
380ZAR Venda (South Africa)
381ZAR Xhosa (South Africa)
382zł Polish (Poland)
383ден Macedonian (Macedonia)
384KM Cyrillic, Bosnian (Bosnia & Herzegovina)
385KM Serbian (Bosnia & Herzegovina)
386лв. Bulgarian (Bulgaria)
387p. Belarusian (Belarus)
388сом Kyrgyz (Kyrgyzstan)
389сом Tajik (Tajikistan)
390ج.م. Arabic (Egypt)
391د.أ. Arabic (Jordan)
392د.أ. Arabic (United Arab Emirates)
393د.ب. Arabic (Bahrain)
394د.ت. Arabic (Tunisia)
395د.ج. Arabic (Algeria)
396د.ع. Arabic (Iraq)
397د.ك. Arabic (Kuwait)
398د.ل. Arabic (Libya)
399د.م. Arabic (Morocco)
400ر Punjabi (Pakistan)
401ر.س. Arabic (Saudi Arabia)
402ر.ع. Arabic (Oman)
403ر.ق. Arabic (Qatar)
404ر.ي. Arabic (Yemen)
405ریال Persian (Iran)
406ل.س. Arabic (Syria)
407ل.ل. Arabic (Lebanon)
408ብር Amharic (Ethiopia)
409रू Nepaol (Nepal)
410රු. Sinhala (Sri Lanka)
411ADP
412AED
413AFA
414AFN
415ALL
416AMD
417ANG
418AOA
419ARS
420ATS
421AUD
422AWG
423AZM
424AZN
425BAM
426BBD
427BDT
428BEF
429BGL
430BGN
431BHD
432BIF
433BMD
434BND
435BOB
436BOV
437BRL
438BSD
439BTN
440BWP
441BYR
442BZD
443CAD
444CDF
445CHE
446CHF
447CHW
448CLF
449CLP
450CNY
451COP
452COU
453CRC
454CSD
455CUC
456CVE
457CYP
458CZK
459DEM
460DJF
461DKK
462DOP
463DZD
464ECS
465ECV
466EEK
467EGP
468ERN
469ESP
470ETB
471EUR
472FIM
473FJD
474FKP
475FRF
476GBP
477GEL
478GHC
479GHS
480GIP
481GMD
482GNF
483GRD
484GTQ
485GYD
486HKD
487HNL
488HRK
489HTG
490HUF
491IDR
492IEP
493ILS
494INR
495IQD
496IRR
497ISK
498ITL
499JMD
500JOD
501JPY
502KAF
503KES
504KGS
505KHR
506KMF
507KPW
508KRW
509KWD
510KYD
511KZT
512LAK
513LBP
514LKR
515LRD
516LSL
517LTL
518LUF
519LVL
520LYD
521MAD
522MDL
523MGA
524MGF
525MKD
526MMK
527MNT
528MOP
529MRO
530MTL
531MUR
532MVR
533MWK
534MXN
535MXV
536MYR
537MZM
538MZN
539NAD
540NGN
541NIO
542NLG
543NOK
544NPR
545NTD
546NZD
547OMR
548PAB
549PEN
550PGK
551PHP
552PKR
553PLN
554PTE
555PYG
556QAR
557ROL
558RON
559RSD
560RUB
561RUR
562RWF
563SAR
564SBD
565SCR
566SDD
567SDG
568SDP
569SEK
570SGD
571SHP
572SIT
573SKK
574SLL
575SOS
576SPL
577SRD
578SRG
579STD
580SVC
581SYP
582SZL
583THB
584TJR
585TJS
586TMM
587TMT
588TND
589TOP
590TRL
591TRY
592TTD
593TWD
594TZS
595UAH
596UGX
597USD
598USN
599USS
600UYI
601UYU
602UZS
603VEB
604VEF
605VND
606VUV
607WST
608XAF
609XAG
610XAU
611XB5
612XBA
613XBB
614XBC
615XBD
616XCD
617XDR
618XFO
619XFU
620XOF
621XPD
622XPF
623XPT
624XTS
625XXX
626YER
627YUM
628ZAR
629ZMK
630ZMW
631ZWD
632ZWL
633ZWN
634ZWR

Excelize 支持为单元格设置自定义数字格式。例如,将 Sheet1 工作表的 A6 单元格 设置为乌拉圭(西班牙)格式的日期类型:

设置自定义数字格式

  1. f := excelize.NewFile()
  2. f.SetCellValue("Sheet1", "A6", 42920.5)
  3. style, err := f.NewStyle(`{"custom_number_format": "[$-380A]dddd\\,\\ dd\" de \"mmmm\" de \"yyyy;@"}`)
  4. err = f.SetCellStyle("Sheet1", "A6", "A6", style)

单元格 Sheet1!A6 在 Office Excel 应用程序中将会被格式化为:martes, 04 de Julio de 2017