I need to export data from my excel sheet into a csv. The code that i have does that. But some of the columns in my excel data have formulae in them. So, when exporting to "csv", i am getting "0" instead of the value.
Is there a pastespecial support for csv ?! Or any other way to export cell-values into csv.
My current code is :
Sub submit_task()
'
' submit_task Macro
'
'
Dim Filename As String
Dim WB As Workbook
Application.DisplayAlerts = False
Filename = "Job_Details.csv"
'Copy the contents of required sheet ready to paste into the new CSV
Sheets("output_sheet").Range("A3:C4").Copy 'Define your own range
'Open a new XLS workbook, save it as the file name
Set WB = Workbooks.Add
With WB
.Title = "Job Details"
.Subject = "Task Submitted"
.Sheets(1).Select
ActiveSheet.Paste
.SaveAs "C:\UI\" & Filename, xlCSV
.Close
End With
Application.DisplayAlerts = True
End Sub