Visual Studio Development Bookmark and Share   
 index > Visual Studio Tools for Office > VSTO code hanging or Excel throwing intermittent errors????
 

VSTO code hanging or Excel throwing intermittent errors????

Hi All,

I am having a very strange problem on VSTO and a document level customization of Excel.

I am using VS 2008 with Excel 2007 and MSSQL 2005, the application is running on Windows Server 2008 Ent Hyper-V with Terminal Services enabled for external access.

My problem is that certain parts of the code won't fire for a specific user where it does fire for another, and then the next time it will be a different part of the code again on different users. IT seems as if the VSTO code is running away for excel. The errors include, but is not limited to:

1. Excel cannot change formatting of range object

2. Code just goes into continuous loop and give the impression of application hang

3. The feared "Exception from HResult"

4. Some users will sometimes get data from another user showing in their Excel.

The Customization and Excel are installed with the Terminal Services installation tool provided with Server 2008.

Description of the application:

The application collects financial data from external stakeholder. Each sheet is a different part of collection and there are about 30 sheets.

- Each sheet can grow horizontal and vertical, from there the Entity Attribute model of the database.

- According to me a Workbook with code behind cannot be shared so I had to handle the sharing of the sheet and data myself, One requirement was multiple users for a company (Their are about 130 companies).

- The data is critical and going over to the next sheet will save excel, save the data to the database (No data-binding, also handled myself)  and then it locks the current sheet in the DB so that nobody else for that company can work on the same sheet.

It is very difficult to explain the issue due to the fact that we cannot pinpoint when and where it happens, it always happens differently and on different parts of the system. (Although these parts work for other users).

Help would be greatly appreciated!

 

 

HenryE  Friday, October 16, 2009 9:42 AM
Hello,

Actually, it is hard to troubleshoot this issue. Could youplease tell me the deployment way of this project? ClickOnce or Windows installer? Deploy this project to share folder or internet? However, here, you could check thesein your codeas below.

1. As you said, I think in your project it is about connection database, please ensure this issue is nothing to do with database.

2. <<The feared "Exception from HResult">>
It is very simple, please be more specific about this error.

It may be helpful ifyou share some code with us here.

Best regards,
Bessie
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bessie Zhao  21 hours 19 minutes ago

Am I correct in saying that multiple users use this sheet at the same time? And your application handles behaviour for each sheet and each user at the same time?

Do you have the same code running for each sheet?

Perhaps you are having a threading issue? Though I'm not sure how.

incre-d  21 hours 3 minutes ago

You can use google to search for other answers

Custom Search

More Threads

• How To Access Add-in Inspector Form Properties from External Application
• pivotfield autosort in c#
• Network write access problem?
• SetSpreadsheetData method with OWC Chart in C#.NET?
• sending e-mail from a SmartTag
• UDF in Excel XP with C#
• Trying to force installer to use VSTOR.exe RC1 build from a file share. Setup can't find it.
• Excel Fixed horizonal and vertical panes that do not scroll when Excel sheets scroll left or Right, up or down
• Using VC++ to control Visio
• Deploying a Word VSTO solution