質問

I have a txt file that contains data which I need to input to Excel.

The problem is I have several of those files and I want to create an excel file for each. So I was thinking of scripting. Can anyone point me to how to start atleast the tool needed and language to use

Thanks

EDIT: turns out naming the extension .csv can directly open it in excel. Now looking on how to open .csv , change format to autofit width and then save to excel

役に立ちましたか?

解決

Why don't you just write CSV files... They open on Excel and require no effort.

http://en.wikipedia.org/wiki/Comma-separated_values

他のヒント

Of course. I have happen to enjoy php a lot for this type of task, but most any other scripting language is capable of this. Ie: Python, Ruby .. and many more.

PHP comes with many built-in functions for CSV. It also runs fine on windows, is cross-platform if you ever need to port on a 'nux environnement. The language is quite easy to learn, there are tons and tons of tutorials out there for most anything you want to script.

To get started, if you want to crack the ice there is a very simple but working example here, with links to more php/excel ressources. OF course, if you take this path, there are many many more examples waiting for you on google.

Hope that helps, good-luck!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top