OK, my brain is slowly understanding the requirement.
So you do not want users formatting your spreadsheets manually.
Why did you not want to use HTML? Would not a browser based report be easier to share across platforms and devices with easier to define page elements and table styles? Most WordPad formatting is in Rich Text Format... not a very pretty underneath.
It is easy with Matrix1 logging, see for yourself:
`%Project Title%
`HTMLLog.dba
`======================
` HTML Formatting
Set Log Tag 1, "<h1 ", "</h1>" + lf$()
Set Log Tag 2, "<p>", "</p>" + lf$()
Set Log Tag 3, "<table>" + lf$(), lf$() + "</table>" + lf$()
If File Exist( "Report.html" )
` Handle the existing file if you do not want append mode active
Open Log "Report.html"
Else
Open Log "Report.html"
WriteLn Log "<html><head><title='%s' /></head><body>", "My Page Title"
Endif
Global content$
WriteHeading("My Heading", "My tooltip")
OpenRow()
AppendCell("Day Number")
AppendCell("Name")
CloseRow()
OpenRow()
AppendCell("Monday")
AppendCell("1")
CloseRow()
OpenRow()
AppendCell("Tuesday")
AppendCell("2")
CloseRow()
OpenRow()
AppendCell("Wednesday")
AppendCell("3")
CloseRow()
WriteTable()
Print "Loading report..."
Wait 1000
Execute File "Report.html", "", ""
End
//==================================================
Function WriteHeading(text$, tooltip$)
WriteLn Log 1, "title='%s'>" + text$, tooltip$ ` Consult the documentation to see what is happening here
EndFunction
//==================================================
Function WriteParagraph(text$)
WriteLn Log 2, text$
EndFunction
//==================================================
Function WriteTable()
WriteLn Log 3, Content$
Content$ = ""
EndFunction
//==================================================
Function OpenRow()
content$ = content$ + Lf$() + "<tr>"
EndFunction content$
//==================================================
Function CloseRow()
content$ = content$ + Lf$() + "</tr>"
EndFunction content$
//==================================================
Function AppendCell(text$)
content$ = content$ + Lf$() + "<td>" + text$ + lf$() + "</td>"
EndFunction content$
I do not see why anything more elaborate than that would be required; but even if you did, you've got millions of HTML and Javascripts on the internet that you could implement here.
Or why not use XML and
XSLT; simply output the data as an XML document which is formatted by XSL enabled browsers.
Also, Excel can work with XML based spreadsheets like the following:
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>user</Author>
<LastAuthor>user</LastAuthor>
<Created>2013-08-04T15:47:17Z</Created>
<LastSaved>2013-08-04T15:48:09Z</LastSaved>
<Version>12.00</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>12906</WindowHeight>
<WindowWidth>21383</WindowWidth>
<WindowTopX>217</WindowTopX>
<WindowTopY>27</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="8" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="48.905660377358487"
ss:DefaultRowHeight="14.264150943396228">
<Column ss:Index="2" ss:AutoFitWidth="0" ss:Width="60.452830188679251"/>
<Row>
<Cell><Data ss:Type="String">Day</Data></Cell>
<Cell><Data ss:Type="String">Name</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell><Data ss:Type="String">Monday</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell><Data ss:Type="String">Tuesday</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">3</Data></Cell>
<Cell><Data ss:Type="String">Wednesday</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">4</Data></Cell>
<Cell><Data ss:Type="String">Thursday</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">5</Data></Cell>
<Cell><Data ss:Type="String">Friday</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">6</Data></Cell>
<Cell><Data ss:Type="String">Saturday</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">7</Data></Cell>
<Cell><Data ss:Type="String">Sunday</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>1</ActiveRow>
<RangeSelection>R2C1:R8C1</RangeSelection>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Sheet2">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="48.905660377358487"
ss:DefaultRowHeight="14.264150943396228">
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Sheet3">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="48.905660377358487"
ss:DefaultRowHeight="14.264150943396228">
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
If you really want to work closely with Microsoft Office, I recommend getting started with the .NET framework, and use Visual Studio for these kinds of jobs. No need for DBPRO to do everything on its own.