Portal Home > Knowledgebase > cPanel > Sending Excel in SAmail
[SAset name=filename value="Raving_Fan_export" /]
[SAtimedOper name=(filename&"_"&(SESSION.uniqueID)) in="10"]
[SAwritefile file=filename&".xls" action="create"][html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"]
[head]
[meta http-equiv=Content-Type content="text/html; charset=windows-1252"]
[meta name=ProgId content=Excel.Sheet]
[meta name=Generator content="Microsoft Excel 11"][!--[if gte mso 9]][xml]
[x:ExcelWorkbook]
[x:ExcelWorksheets]
[x:ExcelWorksheet]
[x:Name]Worksheet Name[/x:Name]
[x:WorksheetOptions]
[x:Selected/]
[x:FreezePanes/]
[x:FrozenNoSplit/][!--- this bit allows you to freeze columns and rows ---]
[x:SplitHorizontal]1[/x:SplitHorizontal]
[x:TopRowBottomPane]1[/x:TopRowBottomPane]
[x:SplitVertical]1[/x:SplitVertical]
[x:LeftColumnRightPane]1[/x:LeftColumnRightPane][x:ActivePane]0[/x:ActivePane]
[x:Panes]
[x:Pane]
[x:Number]3[/x:Number]
[/x:Pane]
[x:Pane]
[x:Number]1[/x:Number]
[/x:Pane]
[x:Pane]
[x:Number]2[/x:Number]
[/x:Pane]
[x:Pane]
[x:Number]0[/x:Number]
[/x:Pane]
[/x:Panes][x:ProtectContents]False[/x:ProtectContents]
[x:ProtectObjects]False[/x:ProtectObjects]
[x:ProtectScenarios]False[/x:ProtectScenarios]
[/x:WorksheetOptions]
[/x:ExcelWorksheet]
[/x:ExcelWorksheets]
[x:ProtectStructure]False[/x:ProtectStructure]
[x:ProtectWindows]False[/x:ProtectWindows]
[/x:ExcelWorkbook]
[/xml][![endif]--][/head]
[body]
[SAif cond=PARAM.reportType.eq."EmpStats"]
[SAimport file="Raving_Fan_EmployeeStatsOutput.aro"]
[SAparam name="export" value=1 /]
[/SAimport]
[SAelse /]
[SAimport file="Raving_Fan_Export_data.aro"][/SAimport]
[/SAif]
[/body]
[/html][/SAwritefile]
[SAset name=Subject value="Raving Fan Export" /][SAmail to=deliveryEmail from=deliveryEmail subject=("Export - "&subject) attachment=filename&".xls" name="nowwwww" html="yes"]
Attached is the Raving Fan Report
[/SAmail]
[SAwritefile file=filename&".xls" action="delete"][/SAwritefile]
[/SAtimedOper]
Add to Favourites Print this Article