Exporting to Excel with %DisplayFormatted
I'm using the below to export a query result to excel file and the only file type is .csv (100) but the resulting has two problems,
first the row header is including the field type and second the resulting file is a tab delimited so columns aren't properly separated (see attached below)
set st = ##class(%SQL.Statement).%New(2,"Sample")
set sql = "select ID, name from MyClass"
set rs = st.%Execute()