Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Edit Module - Export to CSV - Commas in field value

Hi everyone,

I have a macro:

Sub ExportToCSV

set sObject = ActiveDocument.GetSheetObject("TB01")

sObject.Export "C:\Test.csv", ", "

End Sub

However, I have a field FullName, which has values of the format LastName, FirstName.

When I run this macro, LastName and FirstName incorrectly get split into two columns because of the comma.  Is there any way to qualify these cell values so it stays in 1 cell, somehow?

1 Reply
Gysbert_Wassenaar

Specify a different separator, for example a semicolon: sObject.Export "C:\Test.csv", "; "

Or replace the comma's in the FullName field with something else.


talk is cheap, supply exceeds demand