5 Replies Latest reply: Oct 18, 2013 5:44 PM by Bradley Coyne RSS

    VB Macro to Export Table to CSV with No headers !

    Derek Keeble

      Hi - Can anyone help ?

       

      I have the following vb macro that exports data to a csv file :

       

      Sub ExportToFile

      'Download Sheet ojbect data to CSV

      set sObject = ActiveDocument.GetSheetObject("TB01")

      sObject.Export "C:\download\BIB\TestFile.csv", ", "

       

      End Sub

       

      Works perfectly except I don't want the field headers.

       

      After reading a few articles one work around is to kick of a bat file that contains:

      TestFile.csv | find /V "Sort Code,Account Name,Account Number,Amount,Reference,BACS CODE" > noheader.csv

       

      However this just leaves a blank file.

       

      Does anyone have a solution ?????