Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

xls to txt

Options
  • 28-11-2003 7:16pm
    #1
    Registered Users Posts: 7,580 ✭✭✭


    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: 91,238 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 Posts: 195 ✭✭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 Posts: 7,580 ✭✭✭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