Error by write to an Excel Sheet 
Author Message
 Error by write to an Excel Sheet

Hi!

- I open, out of an Outlook-Contact a Excelsheet via VBS. After this I copy
several datafields out of the contact in the sheet and close both.

- Sometime shit happens :-) and I must recrate the sheet. Therefore I wrote
an VB-Proggi. This Prog opens several Outlook-Contacts an close it again.
The VBS in the Contact opens the Excel-sheet an wrote the data using the
item_close methode. This works with over 1000 contacts, mostly without
problems... :-(

- Sometimes it happens that the VBS opens the sheet, but when I write the
first cell in the sheet with

objExcelSheet.Range("G1") = Now

the VBS terminates with 'Object not found'. What could happen between
opening the sheet and the first access of a cell?

- After that, I must reboot client because excel is still active in
Background as an task without window and the server to unlock the xyz.xls
file.
When I start it again, it may be fails again after one or two or it runs for
several hundreds.

Maybe the sheet needs mor time to open. Anybody knows an 'DoEvents' for VBS
or any other thing to get more processing time to the execlsheet?

Idea?

Thanx

Chris



Sat, 24 Jan 2004 17:01:34 GMT  
 Error by write to an Excel Sheet
Q257757 - INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/support/kb/articles/Q257/7/57.ASP

Perhaps not a solution, but it does clarify that Office components are nether designed nor intended
for server side use...

"...Microsoft does not recommend or support server-side Automation of Office...."

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> Hi!

> - I open, out of an Outlook-Contact a Excelsheet via VBS. After this I copy
> several datafields out of the contact in the sheet and close both.

> - Sometime shit happens :-) and I must recrate the sheet. Therefore I wrote
> an VB-Proggi. This Prog opens several Outlook-Contacts an close it again.
> The VBS in the Contact opens the Excel-sheet an wrote the data using the
> item_close methode. This works with over 1000 contacts, mostly without
> problems... :-(

> - Sometimes it happens that the VBS opens the sheet, but when I write the
> first cell in the sheet with

> objExcelSheet.Range("G1") = Now

> the VBS terminates with 'Object not found'. What could happen between
> opening the sheet and the first access of a cell?

> - After that, I must reboot client because excel is still active in
> Background as an task without window and the server to unlock the xyz.xls
> file.
> When I start it again, it may be fails again after one or two or it runs for
> several hundreds.

> Maybe the sheet needs mor time to open. Anybody knows an 'DoEvents' for VBS
> or any other thing to get more processing time to the execlsheet?

> Idea?

> Thanx

> Chris



Sat, 24 Jan 2004 22:37:24 GMT  
 Error by write to an Excel Sheet
Thanks

But only the excel-sheet is stored on the server. The VBS and VB Progs
running on a client.

Chris



Quote:
> Q257757 - INFO: Considerations for Server-Side Automation of Office
> http://support.microsoft.com/support/kb/articles/Q257/7/57.ASP

> Perhaps not a solution, but it does clarify that Office components are

nether designed nor intended
Quote:
> for server side use...

> "...Microsoft does not recommend or support server-side Automation of
Office...."

> --
> Michael Harris
> Microsoft.MVP.Scripting



Sun, 25 Jan 2004 16:00:02 GMT  
 Error by write to an Excel Sheet
Is your code creating an Excel.Sheet object or an Excel.Application object?

The MS recommendation is to always automate Office applications via the Application object rather
than the document type objects which are meant for OLE embedding.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> Thanks

> But only the excel-sheet is stored on the server. The VBS and VB Progs
> running on a client.

> Chris



> > Q257757 - INFO: Considerations for Server-Side Automation of Office
> > http://support.microsoft.com/support/kb/articles/Q257/7/57.ASP

> > Perhaps not a solution, but it does clarify that Office components are
> nether designed nor intended
> > for server side use...

> > "...Microsoft does not recommend or support server-side Automation of
> Office...."

> > --
> > Michael Harris
> > Microsoft.MVP.Scripting



Mon, 26 Jan 2004 04:20:50 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Write SQL from One sheet to another (Excel, VB and Oracle)

2. Write an Excel Sheet in VB?!?

3. Q: How to write an excel sheet in VB - exporting .bmps and colors

4. Write to, calculate, read from Excel workbook-sheet

5. DAO crashes when writing to a excel sheet with macros

6. error in a sheet, excel project doesn't open anymore

7. Error creating Access-DB from Excel-sheet??

8. Excel Sheet Names - Excel.Application.Sheets("sheet1")

9. A Calculation in an Excel sheet

10. CreateObject("Excel.Sheet")

11. Call Excel sheet at VBScript?

12. Excel work sheet in ASP

 

 
Powered by phpBB® Forum Software