I clipped this from a Staff discussion on this feature. The following is all quoted by @emre.
SYNTAX
{REPORT ORDER DETAILS:<expression>:<line format>:<delimiter>}
Orders XML
<orders>
{REPORT ORDER DETAILS:
O.MenuItemName,
O.Quantity,
O.Price,
([O.Quantity]*[O.Price]-[O.ExactTotal]),
O.ExactTotal
:O.MenuItemName.Contains("Toasted")
: <order>
<name>"{0}"</name>
<quantity>{1}</quantity>
<price>{2}</price>
<service>{3}</service>
<total>{4}</total>
</order>}
</orders>
Orders CSV with Summary
Report
Index,Name,Quantity,Price,Service,ExactTotal
{REPORT ORDER DETAILS:
<row>,
O.MenuItemName,
O.Quantity,
O.Price,
([O.Quantity]*[O.Price]-[O.ExactTotal]),
O.ExactTotal,
:
:"{0}","{1}","{2}","{3}","{4}","{5}"}
,,,,,=SUM(F3:F<row-1>)
Orders CSV Group
[Report:1,1,1,1,1,1]
Index,Name,Quantity,Price,Service,ExactTotal
@Breakfast,Wraps,Soup
{REPORT ORDER DETAILS:
O.ItemGroup,
O.MenuItemName,
O.Quantity,
O.Price,
([O.Quantity]*[O.Price]-[O.ExactTotal]),
O.ExactTotal,
:(MG=$1)
:"{0}","{1}","{2}","{3}","{4}","{5}"}
"$1 Total",,,,,=SUM(F<row-{REPORT ORDER COUNT:(MG=$1)}>:F<row-1>)
We can prepare CSV files that support Excel functions.
<row>
tag will replace with row index. We can use expressions like <row+2>
or <row-1>
to reference previous, next rows…
Excel displays it fine.
PS: Because of Excel’s language settings (TR) I’ve used
;
as delimiter.