 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Daniel Mayo Guest
|
Posted: Thu Aug 11, 2005 2:15 pm Post subject: PLEASE HELP! TExcelApplication/Workbook/Worksheet Cells rand |
|
|
Please help.
I am trying to transfer around 200 fields to Excel from CBuilder 6.0.
My code works in workbooks that don't have too many formulas already
setup in the workbook or if 'Auto Calculate' is turned off in the workbook.
So perhaps someone could be so kind to help me with one of two problems
(or both!):
1) How can I turn the auto calculate feature on and off in Excel from
CBuilder?
or
2) How can I force Excel to handle all my messages or how can I know it
is too busy to receive more commands? I'm basically doing the following
alot:
ExcelWorksheet1->Cells->set_Item((TVariant)row,
(TVariant)numericcolumn,(TVariant)value);
The above (when properly connected to a Excel App, Excel Workbook, and
sheet, via the following, does not seem to work consistently on large
workbooks with a lot of calculations in it:
ExcelApplication1->Connect();
ExcelWorkbook1->ConnectTo(ExcelApplication1->Workbooks->Open((WideString)FullWorkbookPath));
ExcelWorksheet1->ConnectTo(ExcelWorkbook1->Worksheets->get_Item((TVariant)sheetindex));
Any ideas?
|
|
| Back to top |
|
 |
Daniel Mayo Guest
|
Posted: Thu Aug 11, 2005 2:36 pm Post subject: Re: PLEASE HELP! TExcelApplication/Workbook/Worksheet Cells |
|
|
References: <42fb5d7b$1 (AT) newsgroups (DOT) borland.com>
In-Reply-To: <42fb5d7b$1 (AT) newsgroups (DOT) borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 216.174.165.174
Message-ID: <42fb6242$1 (AT) newsgroups (DOT) borland.com>
X-Trace: newsgroups.borland.com 1123770946 216.174.165.174 (11 Aug 2005 07:35:46 -0700)
Lines: 14
Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
Xref: number1.nntp.dca.giganews.com borland.public.cppbuilder.activex:27832
More about the problem:
When Autocalculation is off: All Cells in Excel are properly set by the
Builder App.
When Autocalculation in on: Some Cells (randomly) will be properly set
in Excel and many others wil be untouched by the same routine.
Repetitive calls from the Builder app will eventually set all the
cells.. but I don't think that's the right way to do it.
Thoughts?
I need autocalculate on at least at the end. (to force calculation)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|