The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to display string starts with 0 in export excel

I have a string value of 01/07/2011 in a date column.
When exporting in excel, it will remove the 0 into 1/7/2011 and it's aligned to the right.
Is it possible to add something to the smarty template so that the 0 will be printed in excel?

Thank you.
Hi Ferri,

Ah yes... I encountered this once. I think you need to append a ` or ' character to the start of the cell. Excel does a lot of "clever" stuff to help you out. Wink And, well, it often backfires.

Gives this thread a read through. You'll need to tweak the Excel export type in the Export Manager module a little tweak to add the extra character.

Good luck! Smile

- Ben
Thanks for the hints!

I have come up with a working solution:
in the Excel export type in the Export Manager, use this:
     {if $col_name == "date_of_birth"}
It will simply add the extra space in the excel column instead of '.
Excellent! Glad you found a solution - and thanks for posting your fix. Smile

- Ben

Forum Jump:

Users browsing this thread: 1 Guest(s)