Article View: comp.lang.basic.visal.3rdparty
Article #1Tidestone Formula One Control: Method 'Write' of object 'IF1Book' failed
From: Michael Carton
Date: Sat, 27 Jan 2001 23:28
Date: Sat, 27 Jan 2001 23:28
92 lines
4786 bytes
4786 bytes
Hi,
I have been encountering an error on the Write method call. I get the messages
Method 'Write' of object 'IF1Book' failed
and
Automation error. The object invoked has disconnected from its client.
Host Environment: VB 6 (Service Pack 4) Enterprise Edition
OS : Windows NT Workstation (Service Pack 5)
Formula 1 : 6.1.5 Build 12
The workbook is not directly connected to a database. No objects
or pictures on the workbook. I open an ADO recordset, populate the
workbook adding sheets as necessary, apply formatting to cells
depending on the data and define names for ranges. I then open another
recordset to retrieve formulae stored in the database and add those
formulae in some cells (multiple worksheets) using the names defined
above.
The users have an export toolbar button which allows them to write the
data out to an Excel 97 workbook. Here I set Repaint to false, add a sheet
with some control information (because the workbook will have to be imported
back) and write the book out using
.SaveFileDlg or SaveFileDlgEx (using a default name and type 11 for Excel97)
.Write <Name>, <Type>
This Write fails often (80% of the time or more). It works some times.
More Info
---------
Sheets: Between 1 and 30, one for each department. Write fails for anything
more than 5 sheets. With less than 5 sheets, it depends on the phase
of the moon. :-)
Sheet names are like '0008878 - Products & Services'. Dept. ID and name,
essentially.
Rows: Between a dozen to around 300 per sheet. No more than 500. Write fails
with even a total of 100 rows/sheet and 6 sheets. 3 rows are fixed.
Cols: 47. Exactly. First 10 are hidden with text data. Next 2 are fixed with
text data. Remaining are numbers and formulae that calculate
percentages (with IF conditions to avoid divide-by-zero).
Names: One name per row. Every row, every sheet.
R<RowID> as <Sheet Name>!$A$<Row>:$AU$<Row>
Ex. R420002101 as '0008878 - Products & Services'!$A$12:$AU$12
R420002102 as '0008878 - Products & Services'!$A$13:$AU$13
Formulae:
Both dynamically generated in code and retrieved from database. Mostly
use the names. For ex., 32 cells in row 14 might be assigned the
formula
R420002101 + R420002102
so that these 32 cells in row 14 show the sum of corresponding cells in
rows 12 and 13.
These formulae could use names that refer to ranges on the same sheet or
multiple sheets.
Some (a few) formulae use the more conventional spreadsheet formulae
to refer to ranges from the same sheet on which formulae are present.
About one in 5 or 6 rows has formulae.
Formatting:
Mostly I use the default Arial font with no pattern. Sub-total and total
rows pastel shade patterns (2 different shades) and are in bold.
Miscellaneous:
I don't use SaveWindowInfo(). Can't find anything relevant in the
Tidestone KB or FAQ.
I hope someone can help. I'd be glad to exchange notes with anyone who might
have experienced similar issues.
Thanks in advance.
--
MikeC
Please reply to the group.
Technical Details
Message-ID:
<3A735988.ABF3863A@erols.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!hermes.visi.com!news-out.visi.com!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 112c9b,1c9e0dd63e2a1514,start X-Google-Attributes: gid112c9b,public X-Google-Thread: f8e75,1c9e0dd63e2a1514,start X-Google-Attributes: gidf8e75,public X-Google-Thread: 1110c5,1c9e0dd63e2a1514,start X-Google-Attributes: gid1110c5,public X-Google-Thread: ff27c,1c9e0dd63e2a1514,start X-Google-Attributes: gidff27c,public X-Google-Thread: 107d5a,1c9e0dd63e2a1514,start X-Google-Attributes: gid107d5a,public X-Google-ArrivalTime: 2001-01-27 15:40:01 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!hermes.visi.com!news-out.visi.com!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail From: Michael Carton <MikeC@erols.com> Newsgroups: comp.lang.basic.visal.3rdparty,microsoft.public.vb.3rdparty,microsoft.public.vc.3rdparty,borland.public.delphi.activex.controls,borland.public.delphi.activex.controls.using Subject: Tidestone Formula One Control: Method 'Write' of object 'IF1Book' failed Date: Sat, 27 Jan 2001 18:28:08 -0500 Lines: 92 Message-ID: <3A735988.ABF3863A@erols.com> Reply-To: localhost@127.0.0.1 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: UmFuZG9tSVaZpb1AMEio2B2+3+gUGaqy+U7L2uNN8txtC+6TkR011r+vj4sPrOmd X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 27 Jan 2001 23:37:26 GMT X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en