Excel2007 (*.xlsx)doc OPen too Slow

Dec 27, 2012 at 8:39 AM

Hi,

  I create an dna Project and define some Methods. I insert  20000 functions is one doc,then save as (excel2007.xlsx) and save as (excel2003.xls) in anthor file.

I find to open the "excel2007.xlsx" file is very slowly ,but "excel2003.xls" will be opened at once.

I define Method like this:

   public static object TD_(object dateTime, object market, object direct) 

{            return .....;      }

-----------------------------------------

How can I solve this problem??

Coordinator
Dec 27, 2012 at 3:21 PM

Hi,

I suggest you test the following:

1. Compare the .xls vs. .xlsx behaviour when you use a built-in function.

2. Compare .xlsx and .xlsb files (the .xlsb is much smaller).

3. Figure out whether Excel is recomputing in one case and not the other - maybe add a static counter to your code, with some accessor function, and just increment it every time your function is called. That will tell you whether Excel is recomputing in both cases.

That might give us a start to seeing whether this is just some Excel behaviour, or has something to do with Excel-DNA.

-Govert

Jan 5, 2013 at 12:30 AM

Hi,

If I Register 4000 Methods,it will be slow.If I Register only one method,it will be ok.The Method count may be has some problem.