I am currently using an unix environment. I think unix does not recognise excel file(.xls).But they recognise text file like (.txt). Is it possible to convert it into .txt format?
How can this be done?
converting excel file to text file in unix
Hi Swakoo
Does Open Office recognize and open Excel files? I believe it may do. You could open the files in the Open Office spreadsheet package and then save them as txt.
How you do this automatically in PHP (or perhaps Perl) is beyond my meagre skills, however.
Norm
I used OpenOffice for a while and it does open .xls files. PHPclasses.org has a class for reading/writing to xls files.
http://www.phpclasses.org/browse/package/1919.html
You'll have to login (or register), but it's free and there are tons of great classes in there (PDF, SOAP, etc).
A quick Yahoo search (yep, I prefer Yahoo over google), pointed me to the a few php and perl projects to read xls files using the new (PHP 4.3 and up) xlsfile:// protocol.
Biggus
ok.. but is there any tools to convert it into a txt format? my job are mainly for batch processing thus i don't wish to do manual worl..
thanks
Hi Swakoo
What Biggus is saying is that PHP already has the tools necessary to write your own batch processor. It seems there are ready-made classes to get this done, so you can just copy, paste and adapt.
HTH
Norm
sorry..
i am totally new to all these.. even the unix environment..
can like give me some steps to do or any site with tutorial on how is it done?
i am just a student doing my attachment.. and they ask me to do batch processing..
thanks..
Hi Swakoo
What are you studying? If your teacher told you to create a batch processor for Excel files, I assume you're studying computing or similar. So your teacher's request isn't particularly strange. Or are you studying Renaissance painting - in which case your teacher's request is a bit much?
Google is always a cool address for finding tutorials. If you want a tool / code which does it for you, try this. I don't know if it's any good, but it claims that it can be called from PHP.
There's also this which ain't free either, but you can test it for 15 days.
HTH
Norm
Hi Swakoo
I appreciate your predicament. As a part-time and former full-time teacher myself, my feeling is that teachers are not there to test, but to teach. So, if you are technically and practically challenged by the assignment, I really suggest you approach your teacher and be honest about the fact that you don't feel up to the task and tell her/him why. The teacher should at least be willing to show you where you can find help.
I'm guessing the following:
You don't know much about *nix and how to do things using the shell. Join the club, but I'm working on it.
You don't know any PHP or Perl. The solution to this is to do some tutorials, get the stuff installed and get on with it. If you can afford it, buy some books - I recommend Wrox, O'Reilly, New Riders and SAMS. You can often get these books second-hand from Amazon.
You don't know much about OOP and how it works. Again, join the club, but I'm working on it.
The challenge is what makes it fun, however. I am intellectually challenged by everything I do on the computer - which is why I do it. My only advice is to make some coffee, have a bottle of water and some vitamin-rich food to hand (fruit is better than chocolate) and sit yourself down in front of the computer. Then start learning - it's all there for you to discover, thanks to the internet.
But remember to take some breaks - going for a jog in between times is a good way of revitalizing your body and your brain ready for the next computing challenge.
OK - that's enough advice from grandpa Norman. By February you'll know and understand five times as much as I do, or indeed will ever do.
Best o luck
Norm
well thanks for your advice.. you got it mostly correct. the only wrong is maybe you misunderstood me. i am currently doing my attachment which is some sort like working in a industrial company for 3 month. all those project are for commerical purpose. the people here have their own dateline to meet.
i am now trying or should i say playing with the tools. and i think i am getting the hand of it.
thanks..