Http://www.cnblogs.com/penseur/archive/2011/02/25/1964522.htmlNeedless to say, in the vim of the expression has been very widely used. In the most commonly used /and: S commands , regular expressions are essential. The following is a description of
Excel spreadsheet in a number of forms, there are many formats, common Arabic numerals, Chinese lowercase numerals and Chinese capital numbers!
Now, let me introduce you to how to convert Arabic numerals in Excel to lowercase and Chinese capitals.
Method 1:
Function dx (n) {// converts the amount in uppercase.If(! /^ (0 | [1-9] \ D *) (\. \ D + )? $/. Test (n ))Return "invalid data ";VaR unit ="Hundreds of thousands of yuan corner points", STR = "";N + = "00 ";VaR P = n. indexof ('.');If (P>
Main functions
Code :
Copy code The Code is as follows: function Chinese (Num)
{
If (! /^ \ D * (\. \ D *)? $/. Test (Num ))
{
Alert ("You did not enter a number. Please try again! ");
Return false;
}
VaR AA = new array ("zero", "one", "two",
Requirement: enter an Arabic number, give the corresponding Chinese Characters in uppercase, and write it as a stored procedure or function.
For example, enter 12345, and the program will show you:For example, enter 10023040, and the program will
CREATE FUNCTION Changebigsmall
(@ChangeMoney money)
RETURNS VarChar (M) as
BEGIN
Declare @String1 Char (20)
Declare @String2 Char (30)
Declare @String4 Varchar (100)
Declare @String3 Varchar (100)--value removed from the original a value
Declare @i
First Type:
As shown in the figure, you need to convert the numbers in the table to uppercase
As shown in the figure
As shown in the figure, right-click the mouse, select the Format cell, click Open
A window appears, choosing
Main function Code:
Copy Code code as follows:
function Chinese (num)
{
if (!/^\d* (\.\d*) $/.test (num))
{
Alert ("You are not entering a number, please re-enter!");
return false;
}
var AA = new Array ("0", "one", "II", "three", "
Copy Code code as follows:
function Notochinese (num) {
if (!/^\d* (\.\d*)? $/.test (num)) {alert (' number is wrong! '); return ' number is wrong! ';}
var AA = new Array ("0", "one", "II", "three", "Restaurant", "WU", "Lu", "Qi", "ba",
Write it down for later use!
///amount to uppercase amount/// public class Moneyconvertchinese {///////// public string Moneytochinese (string Lowermoney) {string functionreturnvalue = null; BOOL isnegative = false; is a negative number
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.