Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

xls to txt

  • 28-11-2003 07:16PM
    #1
    Registered Users, Registered Users 2 Posts: 7,581 ✭✭✭


    I have about 5000 xls files that I need to convert to txt files. Can I just write a quick java prog to rename them and not lose the fact that they're tabbed? Its only one column of Info in them.

    Or am I going to have to do it manually :(:(

    Reason for this is cas I have to park them into a MySql database, and I've found nothing to suggest that MySql supports xls. If it does let us know and disregard the rest ;)

    E


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 95,992 Mod ✭✭✭✭Capt'n Midnight


    no you can't rename them
    BTW: you would not need a java app to do that - in dos
    RENAME *.xls *.txt
    XCOPY *.XLS *.TXT /S (if they are in lots of folders)

    You could change the default save file type. this will speed it up a little.

    But you may have to write a VB app (macro) to do this.
    Record a file open and save as txt
    This is a way of getting a list to gether to feed to the macro...
    DIR *.XLS /B /S > Filelist.txt (you can import this into Excel - don't break on spaces 'cos you want the full name)

    A little programming with a Loop might then do it.

    ===============================
    Yes there has got to be better way....

    Excel should have ODBC drivers for SQL so a direct import may be possible ???


  • Registered Users, Registered Users 2 Posts: 202 ✭✭DecTenToo


    You should jsut be able to output directly to text through an excel odbc driver. There should be one that does direct to text?

    http://www.ozgrid.com/Services/convert-excel-text-txt.htm may be an option.

    http://www.vsn-intl.com/genstat/downloads/datald.htm seems as though it's a freebie


  • Registered Users, Registered Users 2 Posts: 7,581 ✭✭✭uberwolf


    had a look at that and thanks for the advice. I found tho that if i change them to *.text they appear in the right format (single column)


Advertisement