Help!!! Convert Excel file to ASCII file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help!!! Convert Excel file to ASCII file

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Help!!! Convert Excel file to ASCII file

    [Originally posted by dot]

    How can I convert an Excel file to an ASCII file

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Help!!! Convert Excel file to ASCII file

    [Originally posted by JoeC]

    Let Excel do the work...

    First, add a project reference to Microsoft Excel, then:

    Dim ApExcel As Object
    Dim WrkBook As Workbook

    Set WrkBook = ApExcel.Workbooks.open("Path\FileName.xls") 'could come from Dialog box

    WrkBook.SaveAs "Path\FileName.txt", xlTextWindows
    OR:
    WrkBook.SaveAs CommonDialog1.Filename, xlTextWindows

    ApExcel.Workbooks.Close
    ApExcel.Quit
    Set ApExcel = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center