'ExcelWriter'에 해당되는 글 2건
- 2010/02/18 :: ExcelWriter Formatting Codes
- 2010/02/16 :: .NET: Error "Couldn't get ObjectContext" when using saOpenInExcel or saOpenInPlace
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 Value | Format String |
|---|---|
| 0 | General |
| 1 | 0 |
| 2 | 0.00 |
| 3 | #,##0 |
| 4 | #,##0.00 |
| 5 | ($#,##0_);($#,##0) |
| 6 | ($#,##0_);($#,##0) |
| 7 | ($#,##0.00_);($#,##0.00) |
| 8 | ($#,##0.00_);($#,##0.00) |
| 9 | 0% |
| 10 | 0.00% |
| 11 | 0.00E+00 |
| 12 | # ?/? |
| 13 | # ??/?? |
| 14 | m/d/yy |
| 15 | 0.00% |
| 16 | d-mmm |
| 17 | mmm-yy |
| 18 | h:mm AM/PM |
| 19 | h:mm:ss AM/PM |
| 20 | h: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);_(* "-"_);_(@_) |
| 45 | mm:ss |
| 46 | [h]:mm:ss |
| 47 | mm:ss.0 |
| 48 | ##0.0E+0 |
| 49 | @ |
TAG
ExcelWriter
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" %> |
TAG
ExcelWriter