Page 1 of 1

How to change save as type in php

Posted: Tue Jul 28, 2009 3:54 pm
by varma457
Hi,

I have a problem saving a file..
Like I am getting data as excel file ..How do I convert excel to .CSV format..


Thanks in advance..

Re: How to change save as type in php

Posted: Tue Jul 28, 2009 3:58 pm
by requinix
It is an actual Excel file? Like .xls and everything? Somebody around here (I forgot who - sorry) helped develop PHP Excel: you can use that to open the file, read data, and reformat it as CSV.

But... save file from where? Where are you "getting data" from? Can you get it in a different format?

Re: How to change save as type in php

Posted: Tue Jul 28, 2009 4:04 pm
by varma457
tasairis wrote:It is an actual Excel file? Like .xls and everything? Somebody around here (I forgot who - sorry) helped develop PHP Excel: you can use that to open the file, read data, and reformat it as CSV.

But... save file from where? Where are you "getting data" from? Can you get it in a different format?

I wanted to automate ..Like you know I will set up a cron job..it will do right..

Re: How to change save as type in php

Posted: Tue Jul 28, 2009 4:16 pm
by requinix
Then PHP Excel should be fine. Set up a cron job, make your code parse the .xls and write a separate .csv, and you're done.