惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
B
Blog
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
IT之家
IT之家
D
Docker
Google DeepMind News
Google DeepMind News
罗磊的独立博客
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
博客园 - 司徒正美
Engineering at Meta
Engineering at Meta

博客园 - 以天

用DTS从Excel中往SQL SERVER导入数据的问题 - 以天 - 博客园 [AS3]DispatchEvent的古怪问题 FLASH的安全策略,PNG/XML HttpHandle中间的Session的使用 与 web.config中HttpModel 用Eclipse+CDT+MinGW+SVN搭建跨平台的开发环境 - 以天 - 博客园 C++和.net的对象创建 让你的WCF服务支持WebGet属性 - 以天 - 博客园 QC9的安装心得 AS3中的Timer和Event.EnterFrame的区别 XFile中的UV坐标(Panda Xfile导出)的坐标系和3dMax的坐标系不对 [WCF]今天做了一个WCF的测试,测试的结果让我很出乎意料,但百思不得其解啊。 [AS]Sprite的buttonMode带来的问题 [Flash]FMS发布live视频时会出现第一次发布不成功 [Flash]Flash在网页中不能适应用户显示/影藏IE的状态栏时改变舞台大小 [C#]10进制到Excel的26进制的转换函数 [JS]关于Js文件的导入, [AS3]使用LoadInfo的addEventListener时一定要注意结束时调用removeEventListener 各行业的龙头股 (整理) [AS3]单个图片进行角色动作化处理【转】
[其他]水晶报表中的人民币大写函数
以天 · 2008-01-26 · via 博客园 - 以天

Function RMB ( ls as Currency) as string
      Dim  dblAmount as Double
      Dim   MA1(14)   as   string   ,MA2(14)   as   string,   x   as   string,   y   as   string,   Y1,   LML   As   number  
      Dim   NS   as   number,   NS0   As   Currency  
      Dim   i   As   number  
   
      dblAmount = CDbl(ls)
      MA1(   1)   =   "分"  
      MA1(   2)   =   "角"  
      MA1(   3)   =   "元"  
      MA1(   4)   =   "拾"  
      MA1(5)   =   "佰"  
      MA1(6)   =   "仟"  
      MA1(7)   =   "万"  
      MA1(8)   =   "拾"  
      MA1(9)   =   "佰"  
      MA1(10)   =   "仟"  
      MA1(11)   =   "亿"  
      MA1(12)   =   "拾"  
      MA1(13)   =   "佰"  
      MA1(14)   =   "仟"  
      MA2(1)   =   "壹"  
      MA2(2)   =   "贰"  
      MA2(3)   =   "叁"  
      MA2(4)   =   "肆"  
      MA2(5)   =   "伍"  
      MA2(6)   =   "陆"  
      MA2(7)   =   "柒"  
      MA2(8)   =   "捌"  
      MA2(9)   =   "玖"  
   
      x   =   "整"  
      y   =   replace(Trim(CStr(dblAmount)),",","")  
     
   
      If   InStr(y,   ".")   =   0   Then  
          y   =   y   +   "00"  
          Else  
              LML   =   InStr(y,".")  
              y   =   Left(y,   LML   -   1)   +   Left(Mid(y,   LML   +   1)   +   "00",   2)  
      End   If  
   
      NS0   =   0  
      LML   =Len(y)  
      For   i   =   1   To   LML  
          Y1   =   Mid(y,   LML   -   i   +   1,   1)  
          NS   =   val(Y1)  
          If   NS   <>   0   Then  
              x   =MA2(NS)   +   MA1(i)   +x  
          ElseIf   MA1(i)   =   "元"   Or   MA1(i)   =   "万"   Then  
              x   =   MA1(   i)   +   x  
          End   If  
          If   i   <=   2   Then  
              NS0   =   0  
          ElseIf   NS   =   0   And   NS0   <>   0   Then  
              x   =   "零"   +   x  
              NS0   =   0  
          ElseIf   i   =   6   Then  
              NS0   =   0  
          Else  
              NS0   =   NS  
          End   If  
      Next   i  
      If   dblAmount   <   0   Then  
          x   =   "负"   +   Right(x,   Len(x)   -   1)  
      End   If  
      If   x   =   "元整"   Then  
          x   =   "零"   +   x  
      End   If  

      RMB   =   x  
End Function