Navigation: thinBasic Modules > BIFF > BIFF Example |
|
Example of creation of a Microsoft Excel BIFF 2.1 files
'---Load BIFF module
Uses "Biff"
Dim Count As Number
Dim OutFile As String
Dim MaxLoops As Long
'---Set a 1Mb buffer. This will speed up writing operations
BIFF_SetBuffer(1024 * 1024)
OutFile = App_SourceName & ".xls"
'---Create the file
BIFF_CreateFile(OutFile)
'---Write some random data
For Count = 1 To MaxLoops
BIFF_WriteNumber(RND(1, 100000), RND(1, 1000), RND(2, 5))
BIFF_WriteText ("Num Is " + TIMER, RND(1, 1000), RND(6, 10))
BIFF_WriteDate (Date$, RND(1, 1000), RND(1, 1), 12)
Next
'---Change some columns and rows size
BIFF_SetColWidth(1, 10, 10)
BIFF_SetRowHeight(1, 80)
'---Close the file
BIFF_CloseFile
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |