Exporter CSV file field separator

Hi all,

I am exporting Revit schedules to CSV files. This python script is working fine but the exported CSV files are having " (quotes) to separate values. I want , (comma) as a field separator.

Could you perhaps tweak the code a little bit?

@theshysnail

Please restrain yourself from asking the same question twice.

Sincere apologies. Deleted the reply from the old post. Started this post as it was a new question.

1 Like

Are you sure the quotes aren’t to identify text, that may also contain commas? Here is what the API guide has to say, so you should be able to change the delimiter if needed.
Place the following under the opt.HeadersFootersBlanks line and see if that works.

opt.FieldDelimiter = ","

https://www.revitapidocs.com/2020/ab15f2b5-d828-a07e-1bbc-a3029cc40d28.htm

2 Likes

This image is showing after I add your code.
On the left side is direct Excel and Notepad preview before using the code.

It appears that is working as expected, or is that not what you wanted?

3 Likes

Oh right! Thanks @SeanP