Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Updating synchronized spreadsheets

Hello

I've got a simple .net application with two excel spreadsheets
(AxSpreadsheet). A change in one triggers a SheetChange event updating the
other spreadsheet. My sheetchange event handler is the following:

private void axSpreadsheet1_SheetChange(object sender,
AxMicrosoft.Office.Interop.Owc11.ISpreadsheetEvent Sink_SheetChangeEvent e)
{
if (sender == null || e == null)
{
return;
}
foreach(Range cell in e.target)
{
axSpreadsheet2.Cells.get_Item(cell.Row,cell.Column ).Value2 =
cell.Value2;
}
}

It works fine with simple editing of cells and copy/pasting, but when I
delete a row or a column, the method goes through all the cells in the sheet,
resulting in a freeze of the application. What's the smart way to do it? I
appreciate all your suggestions.

Regards,
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating Excel spreadsheets kachasu Excel Discussion (Misc queries) 2 March 11th 09 08:00 PM
Comparing and updating two spreadsheets Kaylen Excel Discussion (Misc queries) 8 January 30th 09 11:22 PM
Updating spreadsheets Cloudbuster Excel Discussion (Misc queries) 2 August 31st 06 10:16 PM
updating separate spreadsheets GTM Excel Worksheet Functions 1 March 30th 06 01:55 AM
Linking and updating spreadsheets KC8DCN Excel Discussion (Misc queries) 3 February 17th 06 01:05 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"