Export as csv with calculated fields

Archived from the Xataface Users forum.

jvinolas — Tue Jan 18, 2011 1:24 am

Hi,

I managed to get calculated field on export_csv action. My problem is that I can’t get the calculated field as a number in Calc. If I make the format with __display as 1.234,56 (using number_format()), it adds a ‘ in the beginning as ‘1.234,56, so it gets as text field. If I leave it on default number format (1234.56), then it doesn’t add the ‘ but Calc doesn’t let me change it to a number format as it does recognize the , as decimal pointer, not the dot.

Do you know how to correctly export a calculated field as a number?

Thanks in advance.


shannah — Fri Jan 21, 2011 10:16 am

This sounds like a bug somewhere. I don’t think I’ve explicitly set it to add a ‘ for any values in exporting CSV. Can you show me a sample csv exported row?

What version of Xataface/PHP/MySql are you using?

-Steve


jvinolas — Tue Jan 25, 2011 1:50 am

Hi,

Sorry, my mistake in export csv. It is working perfectly.

Thanks.