View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jimi[_2_] Jimi[_2_] is offline
external usenet poster
 
Posts: 1
Default Converting Column CellFormats in a script file

Hi

Im writing a script file to convert a CSV to a XLS and format some of the
columns into a particular date format.

So far this is where I'm at:
Dim appExcel
Dim wbSource

On Error Resume Next
Set appExcel = CreateObject("Excel.Application")
appExcel.DisplayAlerts = False
Set wbSource = appExcel.Workbooks.Open("C:\temp\Comm.csv")

wbSource.SaveAs "C:\temp\Comm.xls", 39
wbSource.Close False

Set wbSource = Nothing
appExcel.Quit
Set appExcel = Nothing

This converts the CSV to a XLS, but I don't know how to format the columns
to a custom (dd/mm/yyyy) date format (btw, the data starts on the 2nd line
of the spreadsheet since the first line is headings). Anyone with any ideas?

Thanks
Jimi