lamquanthanh999 / excellibrary

Automatically exported from code.google.com/p/excellibrary
1 stars 0 forks source link

Enhancement - Add Time Format to CellFormat.cs #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Guys,

 That last correction I had suggest don't quite work for me, so I Resolve
to Add just 2 new Types on cell Format to make it easy... 

 If you want to you it, fill free to do so: 

After yours "public static readonly CellFormat Date = new
CellFormat(CellFormatType.Date, @"YYYY\-MM\-DD");"

I write: 

        /// <summary>
        /// Format the DateTime with: "HH:mm:ss" e.g: 14:45:00
        /// </summary>
        /// <example>Format the DateTime with: "HH:mm:ss" e.g:
14:45:00</example>
        public static readonly CellFormat Time = new
CellFormat(CellFormatType.Time, "HH:mm:ss");
        /// <summary>
        /// Format the number with: "#,###.00000" e.g: 100.12345
        /// </summary>
        /// <example>Format the number with: "#,###.00000" e.g:
100.12345</example>
        public static readonly CellFormat Engineer = new
CellFormat(CellFormatType.Scientific, "#,###.00000");

Original issue reported on code.google.com by gui.lo...@gmail.com on 17 Feb 2009 at 12:28

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, this will be included.

Original comment by China.LiuJunFeng on 18 Feb 2009 at 8:34

GoogleCodeExporter commented 9 years ago
By r35.

Original comment by China.LiuJunFeng on 2 Mar 2009 at 6:20

GoogleCodeExporter commented 9 years ago
LiuJun,

  Please, I found a little problem on the annotation for Engineer, if We put like
was: "#,###.00000" when we have a little numer like 0.21, he will be 
represented like
".21", but the right representation of it is: "0.21" so
  I would like to change this to: "#,##0.00000" Change only 1 zero. 

Thanks, in advance.

public static readonly CellFormat Engineer = new
CellFormat(CellFormatType.Scientific, "#,##0.00000");

Original comment by gui.lo...@gmail.com on 25 Mar 2009 at 1:48