Study/.net 2010/02/18 13:09

Use the Number property to set the display format of numbers and dates. Number may be a property of the Style object or of Cell.Format. The table below lists predefined formats. You can also define custom formats, for example, a timestamp format:

 
set TimeStampStyle = XLW.CreateStyle
TimeStampStyle.Number = "mm/dd/yyyy hh:mm:ss AM/PM"
 
Format.Number ValueFormat String
0General
10
20.00
3#,##0
4#,##0.00
5($#,##0_);($#,##0)
6($#,##0_);($#,##0)
7($#,##0.00_);($#,##0.00)
8($#,##0.00_);($#,##0.00)
90%
100.00%
110.00E+00
12# ?/?
13# ??/??
14m/d/yy
150.00%
16d-mmm
17mmm-yy
18h:mm AM/PM
19h:mm:ss AM/PM
20h:mm
37(#,##0_);(#,##0)
38(#,##0_);(#,##0)
39(#,##0.00_);(#,##0.00)
40(#,##0.00_);(#,##0.00)
41_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)
42_($* #,##0_);_($* (#,##0);_(* "-"_);_(@_)
43_(* #,##0.00_);_(* (#,##0.00);_(* "-"_);_(@_)
44_($* #,##0.00_);_($* (#,##0.00);_(* "-"_);_(@_)
45mm:ss
46[h]:mm:ss
47mm:ss.0
48##0.0E+0
49@
저작자 표시 비영리 변경 금지
posted by 에이브리
Study/.net 2010/02/16 13:14
Problem
When using ExcelWriter within the ASP.NET framework, you may see this error message which occurs upon calling the Save method when using the saOpenInExcel or saOpenInPlace save options:
System.Runtime.InteropServices.COMException (0x80020009): Couldn't get ObjectContext. Please check "Save" method signature at SoftArtisans.ExcelWriter.SAExcelTemplateClass.Process(String FileName, SAProcessMethod ProcessMethod, Int32 ExcludeMacro)
Solution
The saOpenInExcel and saOpenInPlace options require the internal availability of conventional ASP's Response object. In order to make this object available within the context of ASP.NET pages, you will need to add ASPCompat=True to your Page directive:

<%@ Page ASPCompat="True" %>

저작자 표시 비영리 변경 금지
posted by 에이브리