+ Reply to Thread
Results 1 to 3 of 3

How to import Excel file to CSV Step-by-Step

Hybrid View

  1. #1
    Registered User
    Join Date
    02-26-2009
    Location
    India
    MS-Off Ver
    Access
    Posts
    46

    How to import Excel file to CSV Step-by-Step

    Good morning members,

    I have an excel file that I would like from a click of a button import into a CSV file.please give me your suggestions

    Thanks

  2. #2
    Webtekr
    Guest

    Re: How to import Excel file to CSV Step-by-Step

    So let me get this right, you have an Excel file and you do not have it linked to Access but would like to convert the xls to csv? Why not simply open the spreadsheet in Excel and save it as a csv?

    If you have it linked Access as an Excel spreadsheet then create a macro using the TransferSpreadsheet command.

  3. #3
    Forum Administrator ExlGuru's Avatar
    Join Date
    03-17-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: How to import Excel file to CSV Step-by-Step

    Try this

    Public Sub SaveToText()
    Dim WrkSheet As Worksheet
    Dim CurrFormat As XlFileFormat
    
    CurrFormat = xlCSV
    Set WrkSheet = ThisWorkbook.Worksheets(1)
    
    WrkSheet.SaveAs "C:\MyFile.csv", CurrFormat
    
    Set WrkSheet = Nothing
    End Sub
    
    To save the entire workbook use this line:
    
    ThisWorkbook.SaveAs "MyFilePath", CurrFormat
    Hope this helps
    ExlGuru

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1