数字金额小写160617.68用大小写金额怎么写写

大写数字转换器_数字大写转换器_小写数字转换器_急切网数字转换实例:壹亿贰仟叁佰肆拾伍万陆仟柒佰捌拾玖圆一二三四五六七八九壹贰叁肆伍陆柒捌玖①②③④⑤⑥⑦⑧⑨ 输入您的数字:数字大小写转换大写数字转换器_数字大写转换器_小写数字转换器   一次转换4种格式de超强智能在线数字大小写转换器。   数字小写零到九:   数字大写一到十:零一二三四五六七八九十   数字大写一到十:零壹贰叁肆伍陆柒捌玖拾   人民币读法:壹亿贰仟叁佰肆拾伍万陆仟柒佰捌拾玖圆CopyRight & 2016二次元同好交流新大陆
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
第一种方法:用正则表达式,C#方法如下 using System.Text.RegularE//首先引入命名空间 private string DaXie(string money){
string s = double.Parse(money).ToString("#L#E#D#C#K#E#D#C#J#E#D#C#I#E#D#C#H#E#D#C#G#E#D#C#F#E#D#C#.0B0A");
string d = Regex.Replace(s, @"((?&=-|^)[^1-9]*)|((?'z'0)[0A-E]*((?=[1-9])|(?'-z'(?=[F-L\.]|$))))|((?'b'[F-L])(?'z'0)[0A-L]*((?=[1-9])|(?'-z'(?=[\.]|$))))", "${b}${z}");
return Regex.Replace(d, ".", delegate(Match m) { return "负圆空零壹贰叁肆伍陆柒捌玖空空空空空空空分角拾佰仟万億兆京垓秭穰"[m.Value[0] - '-'].ToString(); }); }第二种方法:采用数组,C#方法如下private string DaXie(string money) {
//将小写金额转换成大写金额
double MyNumber = Convert.ToDouble(money);
String[] MyScale = { "分", "角", "元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟", "兆", "拾", "佰", "仟" };
String[] MyBase = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" };
String M = "";
bool isPoint =
if (money.IndexOf(".") != -1)
money = money.Remove(money.IndexOf("."), 1);
for (int i = money.L i & 0; i--)
int MyData = Convert.ToInt16(money[money.Length - i].ToString());//?
M += MyBase[MyData];//?
if (isPoint == true)
M += MyScale[i - 1];//?
M += MyScale[i + 1];//?
return M;}
阅读(1541)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'.NET把小写数字金额转换成大写人民币金额的两种算法',
blogAbstract:'.NET把小写数字金额转换成大写人民币金额的两种算法第一种方法:用正则表达式,C#方法如下 using System.Text.RegularE//首先引入命名空间 private string DaXie(string money){
string s = double.Parse(money).ToString(\"#L#E#D#C#K#E#D#C#J#E#D#C#I#E#D#C#H#E#D#C#G#E#D#C#F#E#D#C#.0B0A\");
string d = Regex.Replace(s,',
blogTag:'.net,数字金额,转换,大写人民币金额',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:0,
publishTime:5,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}Excel数字小写金额转换汉字大写金额公式的简单设置 - 如水博客
Excel数字小写金额转换汉字大写金额公式的简单设置 - 如水博客
Excel数字小写金额转换汉字大写金额公式在会计工作中是经常应用到的,它能提高工作效率和会计数据的准确性。网上有很多设置Excel数字小写金额转汉字大写金额公式的方法,基本上都很繁琐,且功能不全面(对负金额不能转换)。本人在Excel会计工作实践中,设计了一个数字小写金额转换汉字大写金额的公式,公式仅500多个字符,个人感觉还很满意,现拿出来供大家分享,不足之处,也请大家不吝赐教。公式如下:=IF(ROUND(A1,2)=0,"",IF(A1&0,"负","")&IF(ABS(A1)&=1,TEXT(INT(ROUND(ABS(A1),2)),"[dbnum2]")&"元","")&IF(VALUE(MID(RIGHT(TEXT((ABS(A1)*100+100),"###"),2),1,1))=0,IF(VALUE(RIGHT(TEXT(ABS(A1)*100,"###"),1))=0,"整",IF(ABS(A1)&=1,"零","")&TEXT(VALUE(RIGHT(TEXT(ABS(A1)*100,"###"),1)),"[dbnum2]")&"分"),IF(VALUE(RIGHT(TEXT(ABS(A1)*100,"###"),1))=0,TEXT(VALUE(MID(RIGHT(TEXT((ABS(A1)*100+100),"###"),2),1,1)),"[dbnum2]")&"角整",TEXT(VALUE(MID(RIGHT(TEXT((ABS(A1)*100+100),"###"),2),1,1)),"[dbnum2]")&"角"&TEXT(VALUE(RIGHT(TEXT(ABS(A1)*100,"###"),1)),"[dbnum2]")&"分")))公式中A1为小写金额所在单元格,实际使用中只需将其替换为实际小写金额所在单元格即可,非常方便。公式可以对正数、零(本公式转换为空白,与支票一致,如需转换为“零元整”,只需在公式第一个双引号内加入即可)、负数(会计数据有时也涉及到)均可进行转换。最近,在网上看到高手设计的更简洁的转换公式,缺点是只能把转换为空白,不能转换为“零元整”,公式如下:=SUBSTITUTE(SUBSTITUTE(IF(-RMB(A1),IF(A1&0,,"负")&TEXT(INT(ABS(A1)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHT(RMB(A1,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A1^2&1,,"零")),"零分","整")将以上两个公式结合一下,达到既简短,又能达到的空白和“零元整”两种(根据需要只能选其中一种)转换结果的目的。公式如下:=IF(ROUND(A1,2)=0,"",IF(A1&0,"负","")&IF(ABS(A1)&=1,TEXT(INT(ROUND(ABS(A1),2)),"[dbnum2]")&"元","")&SUBSTITUTE(SUBSTITUTE(TEXT(RIGHT(RMB(A1,2),2),"[dbnum2]0角0分;;整"),"零角",IF(A1^2&1,,"零")),"零分","整"))以上三个公式的转换效果是一样的,如下图所示:
发表评论:
TA的最新馆藏&在基于网页的打印输出或报表中,经常会牵扯到金额的大写,每次都打上去很麻烦,所以想法用一个JavaScript客户端脚本来实现自动转换,只需在需要显示大写金额的时候调用该JS函数,而且也可很好的与动态语言相结合,可将最初的小写金额从数据库中读取出来,然后将值输入进JS函数,自动实现人民币金额的大写转换,完整的JS代码如下:
&script type=&text/javascript& language=&javascript&&
function Arabia_to_Chinese(Num)
for(i=Num.length-1;i&=0;i--)
Num = Num.replace(&,&,&&)//替换tomoney()中的&,&
Num = Num.replace(& &,&&)//替换tomoney()中的空格
Num = Num.replace(&¥&,&&)//替换掉可能出现的¥字符
if(isNaN(Num))
{ //验证输入的字符是否为数字
alert(&请检查小写金额是否正确&);
//字符处理完毕后开始转换,采用前后两部分分别转换
part = String(Num).split(&.&);
newchar = &&;
//小数点前进行转化
for(i=part[0].length-1;i&=0;i--)
if(part[0].length & 10)
alert(&位数过大,无法计算&);
return &&;
}//若数量超过拾亿单位,提示
tmpnewchar = &&
perchar = part[0].charAt(i);
switch(perchar)
case &0&: tmpnewchar=&零& +
case &1&: tmpnewchar=&壹& +
case &2&: tmpnewchar=&贰& +
case &3&: tmpnewchar=&叁& +
case &4&: tmpnewchar=&肆& +
case &5&: tmpnewchar=&伍& +
case &6&: tmpnewchar=&陆& +
case &7&: tmpnewchar=&柒& +
case &8&: tmpnewchar=&捌& +
case &9&: tmpnewchar=&玖& +
switch(part[0].length-i-1)
case 0: tmpnewchar = tmpnewchar +&元& ;
case 1: if(perchar!=0)tmpnewchar= tmpnewchar +&拾& ;
case 2: if(perchar!=0)tmpnewchar= tmpnewchar +&佰& ;
case 3: if(perchar!=0)tmpnewchar= tmpnewchar +&仟& ;
case 4: tmpnewchar= tmpnewchar +&万& ;
case 5: if(perchar!=0)tmpnewchar= tmpnewchar +&拾& ;
case 6: if(perchar!=0)tmpnewchar= tmpnewchar +&佰& ;
case 7: if(perchar!=0)tmpnewchar= tmpnewchar +&仟& ;
case 8: tmpnewchar= tmpnewchar +&亿& ;
case 9: tmpnewchar= tmpnewchar +&拾& ;
newchar = tmpnewchar +
//小数点之后进行转化
if(Num.indexOf(&.&)!=-1)
if(part[1].length & 2)
alert(&小数点之后只能保留两位,系统将自动截断&);
part[1] = part[1].substr(0,2)
for(i=0;i&part[1].i++)
tmpnewchar = &&
perchar = part[1].charAt(i)
switch(perchar)
case &0&: tmpnewchar=&零& +
case &1&: tmpnewchar=&壹& +
case &2&: tmpnewchar=&贰& +
case &3&: tmpnewchar=&叁& +
case &4&: tmpnewchar=&肆& +
case &5&: tmpnewchar=&伍& +
case &6&: tmpnewchar=&陆& +
case &7&: tmpnewchar=&柒& +
case &8&: tmpnewchar=&捌& +
case &9&: tmpnewchar=&玖& +
if(i==0)tmpnewchar =tmpnewchar + &角&;
if(i==1)tmpnewchar = tmpnewchar + &分&;
newchar = newchar +
//替换所有无用汉字
while(newchar.search(&零零&) != -1)
newchar = newchar.replace(&零零&, &零&);
newchar = newchar.replace(&零亿&, &亿&);
newchar = newchar.replace(&亿万&, &亿&);
newchar = newchar.replace(&零万&, &万&);
newchar = newchar.replace(&零元&, &元&);
newchar = newchar.replace(&零角&, &&);
newchar = newchar.replace(&零分&, &&);
if (newchar.charAt(newchar.length-1) == &元& || newchar.charAt(newchar.length-1) == &角&)
newchar = newchar+&整&
function printp(obj)
if (obj.style.display==&none&)
obj.style.display=&&;
obj.style.display=&none&;
&JS处理部分写好了,那么是如何调用呢?往下看,同样简单:假设要在下面的div中显示大写金额,可以这样调用:
&div&&b&已付金额总额(大写):&/b&&script language=&javascript&&document.write(Arabia_to_Chinese(&3,060.00&));&/script&&/div&
也就是把需要转换大写金额的小写数字输入在Arabia_to_Chinese()函数中,然后用javaScript的document.write方法显示在网页上。
本类推荐文章
本类最新更新
最新源码下载数字金额小写大写转换_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
数字金额小写大写转换
上传于||暂无简介
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
你可能喜欢}

我要回帖

更多关于 小写转大写c怎么写 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信