1. tlwebdesign
  2. RO CSVI
  3. Thursday, 05 March 2026
  4.  Subscribe via email
Hi,

I can't seem to figure out how i can format a decimal number i got form my db into a percentage display in the excel export.

What is best way to do this?

Kind regards,
Tom
Accepted Answer Pending Moderation
Hello Tom,
Not sure the extension you use or the number of decimal points you have but normally to convert a decimal number to percentage multiply the decimal number with 100. In RO CSVI that can be done using RO CSVI Field combine rule.

I am giving an example using VirtueMart Product export template and product price field. You can use the same logic with the extension and field you use for export

1. In VirtueMart Product export template, add two template fields product_price and custom. Set custom template field default value to 100. You can set this field to unpublished as this is only used for calculation and don't have to be included in export file.
2. Create a new RO CSVI Field combine rule for export. In Source fields set product_price,custom, Target field as product_price and Operation as Calculation. Perform operation as Multiplication and save the rule. See attached screenshots.
3. Apply this rule on product_price field. That should be it. Run export and check.

Let me know on how that goes.
Attachments (2)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 hours ago
  2. RO CSVI
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!