Numbers exported as text to Excel?

kizo 30 Oct, 2007
Hi.

When choosing to backup my data to xls, Excel says that all my "number-cells" are preceeded with an apostrophe (which they're not)or formated as text.

This makes it impossible for automatic number-functions in Excel.
Of course, this is easily fixed in Excel by just choosing to convert to numbers, but I was wondering if there is any way to change the settings so that numbers will be exported as numbers.

I've tried every kind of table for the field. It should be INT, but that doesn't work nor does anything else.

I'd really appriciate the help.

Thank you.

Numbers exported as text to Excel? image 1
Max_admin 30 Oct, 2007
Hi Kizo,

This is something to change at the function which exports but how do I know if your data type is INT or TEXT ?🙂

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kizo 30 Oct, 2007

Hi Kizo,

This is something to change at the function which exports but how do I know if your data type is INT or TEXT ?🙂

Max

Well, partly because you choose type when creating the tables via Joomla, but I've also checked in phpMyAdmin to make sure.
Max_admin 30 Oct, 2007
Hi,

Iam not very good at excel, but is this type something to set for a cell by cell ? we can check with every cell to see if the value is an integer and make this cell data as integer!!

Sincerely,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kizo 31 Oct, 2007

is this type something to set for a cell by cell ?

Yes, as far as I know.

we can check with every cell to see if the value is an integer and make this cell data as integer!!

I'm not quite sure what you mean?

Thank you.
Max_admin 31 Oct, 2007
Hi Kizo,

at line 641 of admin.chronocontact.php:

$sheet->writeString($rowcount, $datacol, $datarow->$table_field, 0);


we can replace it by :

if(is_int($datarow->$table_field)){ $sheet->writeNumber($rowcount, $datacol, $datarow->$table_field, 0);
}else {$sheet->writeString($rowcount, $datacol, $datarow->$table_field, 0);}


Let me know if it will go fine!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.