Hello,

I found some information in the documentation (header files, I can not stress 
this enough).

short answer, the library supports it, the plugin doesn't.

---

from format.h

// good resource for format strings: 
http://www.mvps.org/dmcritchie/excel/formula.htm
// Good explanation of custom formats: 
http://www.ozgrid.com/Excel/CustomFormats.htm
// MS examples (need Windows): 
http://download.microsoft.com/download/excel97win/sample/1.0/WIN98Me/EN-US/Nmbrfrmt.exe
// Google this for MS help: "Create or delete a custom number format"

the plugin uses the format_number_t enumeration in XLS_FORMAT_SET_NUMERIC_FORMAT

i.e.

typedef enum
{
FMT_GENERAL = 0,
FMT_NUMBER1,            // 0
FMT_NUMBER2,            // 0.00
FMT_NUMBER3,            // #,##0
FMT_NUMBER4,            // #,##0.00
FMT_CURRENCY1,          // "$"#,##0_);("$"#,##0)
FMT_CURRENCY2,          // "$"#,##0_);[Red]("$"#,##0)
FMT_CURRENCY3,          // "$"#,##0.00_);("$"#,##0.00)
FMT_CURRENCY4,          // "$"#,##0.00_);[Red]("$"#,##0.00)
FMT_PERCENT1,           // 0%
FMT_PERCENT2,           // 0.00%
FMT_SCIENTIFIC1,        // 0.00E+00
FMT_FRACTION1,          // # ?/?
FMT_FRACTION2,          // # ??/??
FMT_DATE1,              // M/D/YY
FMT_DATE2,              // D-MMM-YY
FMT_DATE3,              // D-MMM
FMT_DATE4,              // MMM-YY
FMT_TIME1,              // h:mm AM/PM
FMT_TIME2,              // h:mm:ss AM/PM
FMT_TIME3,              // h:mm
FMT_TIME4,              // h:mm:ss
FMT_DATETIME,           // M/D/YY h:mm
FMT_ACCOUNTING1,        // _(#,##0_);(#,##0)
FMT_ACCOUNTING2,        // _(#,##0_);[Red](#,##0)
FMT_ACCOUNTING3,        // _(#,##0.00_);(#,##0.00)
FMT_ACCOUNTING4,        // _(#,##0.00_);[Red](#,##0.00)
FMT_CURRENCY5,          // _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)
FMT_CURRENCY6,          // _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)
FMT_CURRENCY7,          // _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* 
"-"??_);_(@_)
FMT_CURRENCY8,          // _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)
FMT_TIME5,              // mm:ss
FMT_TIME6,              // [h]:mm:ss
FMT_TIME7,              // mm:ss.0
FMT_SCIENTIFIC2,        // ##0.0E+0
FMT_TEXT                // @
} format_number_t;

but custom format based on string requires format_t

> 2019/01/30 16:42、4dialog via 4D_Tech <4d_tech@lists.4d.com>のメール:
>
> The problem is not i 4D, i get the leading zero but only in a text cell.
> In excel you can format manualy a column as number with fixed numbers
> preformated (selfdefined format). In my case, 11 numbers, "00000000000". If
> you put 10 numbers in a cell it gets leading zero.




**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to