BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

#NAME? Error with Excel

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Nirmal Singh
Guest





PostPosted: Wed Jan 05, 2005 11:17 am    Post subject: #NAME? Error with Excel Reply with quote



I am having a problem with an application that uses the Office97 server
components

excelApp.Cells.Item[2,13]:=EncodeDate(2003,12,Cool;
excelApp.Cells.Item[2,14]:=EncodeDate(2003,12,10);
excelApp.Cells.Item[2,15]:='=NetWorkDays(M2,N2)';

The first two lines simply insert these dates into cells M2 and N2.
The next line should return the Working days between these dates (in
cell O2).

The procedure executes without any error, but when I open the Excel
Workbook cell O2 contains #NAME?, althogh the formula bar shows the
correct formula. If I then select cell O2 and press ENTER I get the
correct value (3).

I have also tried the following with the same results:

excelApp.Cells.Item[2,15].Select;
excelApp.ActiveCell.Formula:='=NetWorkDays(M2,N2)';

Any suggestions would be appreciated.

Nirmal Singh


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.