+ Reply to Thread
Results 1 to 2 of 2

Create CSV with values wrapped in quotes

Hybrid View

  1. #1
    Registered User
    Join Date
    08-11-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    15

    Create CSV with values wrapped in quotes

    mike7952 was kind enough to help me with a challenge creating a csv from a single sheet in my workbook to use as an import file for our ERP software. What I have now found out is the software we use is very buggy with formatting. Result, some files work and some return odd errors recognizing the data. I'm told if I can wrap the values in the csv with quotes, it will likely eliminate the random formatting errors. Is there a way to add to mike7952's script (below) to format the data in the csv wrapped with quotes? I also attached a sample copy of my workbook. Thanks in advance if anyone can provide some ideas!!! Best regards...Brett

    Sub Create_ITEM_CSV()
     Dim wks As Worksheet
     Dim newWb As Workbook
     
     Set wks = Worksheets("ITEMIMPORT")
     wks.Copy 'to a new workbook
     Set newWb = ActiveWorkbook
     
     With Application
        .DisplayAlerts = False
            With newWb
               .SaveAs Filename:="C:\Users\Mike\Desktop\" & wks.Name & ".csv", FileFormat:=xlCSVMSDOS
               .Close SaveChanges:=True
            End With
        .DisplayAlerts = True
     End With
     
     Set wks = Nothing
     Set newWb = Nothing
     End Sub
    Attached Files Attached Files
    Last edited by BBen; 10-10-2012 at 10:26 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: Create CSV with values wrapped in quotes

    ...... sorry, Wrong thread...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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