Menu

#3 Creates coruptted Excel File

open
nobody
None
5
2006-12-05
2006-12-05
OldManDan
No

Tried to create large but uncomplicated file. Result was a file that cannot be opened. File consisted of text strings and numbers only.

Code snippets:

filename = "AdviziaDocLang.xls"
Set b8 = New BIFF8
b8.filename = filename
sname = "AdviziaDocLang"
Set sht = b8.Workbook.Worksheets.AddNamed(sname) 'Add sheet (and name it)
Set cells = sht.Cells 'Grab Sheet.Cells Collection object

Roww = 1
Coll = 1
cells.AddValueCell Roww, Coll, "Advizia ID" 'Add Header cells
Coll = Coll + 1
cells.AddValueCell Roww, Coll, "Section"
Coll = Coll + 1
cells.AddValueCell Roww, Coll, "Heading"
Coll = Coll + 1
cells.AddValueCell Roww, Coll, "Title"
Coll = Coll + 1
cells.AddValueCell Roww, Coll, "English"
FOR x=1 TO UBOUND(L,2)
Coll = Coll + 1
cells.AddValueCell Roww, Coll, L(3,x)
NEXT

'Send the file
b8.Send

'Clean up
Set cells = Nothing
Set sht = Nothing
Set b8 = Nothing

response.end

Output takes abt 130 sec.
size is 2.5 meg

File can't be opened by excel or open office calc

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.