Friday, December 4, 2009

Formatting data in Excel

All of the tools I have created to send data directly to Excel from Pronto share the same library of routines. Whether you create a 4GL report fully using GHOSTWRITER, use my Excel include files with your own 4GL program, or use SQL/Output to transform the data from a Pronto SQL query, in each case you are able to exercise a great deal of control over how the data is shown in an Excel cell.


For example, for a numeric field here is how the values -1234.56, zero and 1234.56 would be shown using several different format specifications:

Format-1234.56zero1234.56
----------------------------------------
-(6)9.99-1234.560.001234.56
-(6)zvzz-1234.561234.56
-(6)9-123501235
-(6)z-12351235
-$(5)9.99-$1234.56$0.00$1234.56
---,--9.99-1,234.560.001,234.56
-$$$,$$9.99-$1,234.56$0.00$1,234.56



Here are some different ways to display a date field:

FormatDate
--------------------
dd-mm-yy30-11-09
dd mmm yyyy30 Nov 2009
ddd, dd mmm yyyyMon, 30 Nov 2009


As you can see, as a user you are fully in control of the Excel cell formatting with our Excel tools.

No comments:

Post a Comment