How to change save as type in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
varma457
Forum Newbie
Posts: 23
Joined: Sat Jul 11, 2009 2:43 pm

How to change save as type in php

Post 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..
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to change save as type in php

Post 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?
varma457
Forum Newbie
Posts: 23
Joined: Sat Jul 11, 2009 2:43 pm

Re: How to change save as type in php

Post 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..
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to change save as type in php

Post 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.
Post Reply