Search code examples
phpexcelopentbs

OpenTBS Excel number format


I'm trying to format numbers in an Excel file using PHP and opentbs.

Here's template code I'm working from:

[gross_pay_names;block=begin;sub1=departments][gross_pay_names.name]
[gross_pay_names_sub1;block=begin]
[gross_pay_names_sub1.val; ope=tbs:num] 
[gross_pay_names_sub1;block=end]
[gross_pay_names;block=end]     

The problem is in the third line:

[gross_pay_names_sub1.val; ope=tbs:num]

It always renders with an apostrophe in the beginning ('0.00). So I can't use it in other formulas in the file.


Solution

  • Ok, I found a solutions myself. In case anybody needs it in the future here's the template code I ended up using:

    [gross_pay_names.name;block=tbs:row;sub1=departments]   [gross_pay_names_sub1.val;block=tbs:cell;ope=tbs:num]