Two new issues with the Aspose.Grid

Greetings,

In the testing for the release candidate of our project, we have run into two issues with the Aspose grid.

1) If the control loads an Excel file (.xls file), that contains a font that the control can't handle, the control throws an exception and doesn't load the file. A way of loading the rest of the file and leaving out the text with the font that it can't handle would be much prefered.

2) Some Excel files take a really long time to load. I would say an excessively long time to load. And the Excel files aren't terribly large, maybe 300k. As it stands now, I don't know if our client will accept how long it takes. Loading the same files in Excel takes next to no time. Is there anything that can be done about this? Like maybe a property to turn of running Formulas.

Thanks,

Chris Powell

Hi Chris,

About the first question, please post the excel file to me.

About the second question, I had tested to load a excel file more than 6M. It costs about 10 seconds. The file contains 3 worksheets, and every worksheet contains more than 4000 * 30 cells. please post your excel file to me.

Thanks

Greetings,

I'm attaching a spreadsheet that contains a cell with the font in question. Its just very simple file with really nothing else in it. However, it doesn't load in v1.7.0.0 of the Aspose.Grid control.

I would like to attach the spreadsheet that is causing the problems, but it is a file that belongs to our client and I'm not free to post it. And I'm right in the middle of a release at the moment, so I don't have enough time to create a similar test spreadsheet file. Most of the cells in the sheet contain functions, some of which don't evaluate properly at the moment, as the spreedsheet is a template sheet, and will be filled with data at another point. There is also a chart in the sheet that relies on values from the formulas that don't evaluate properly. Excel just shows an empty chart, and the formulas that don't evaluate properly are just flagged as evaluating improperly. Is it possible that the control takes extra time when it encounters a situation like this? Sorry I can't be of more help on this one.

Thanks,
Chris Powell

Greetings,

I did a little more testing. I removed the chart from a copy of the file that is taking so long to load. It continues to take forever to load.

I tried something else. I ran the application outside of Visual Studio. Up to now I have been doing my testing by running the application from Visual Studio, so I can step through code when I need to. When I run the app outside of Visual Studio (2003), the file loads up much quicker. 20 seconds vs 4 minutes. So this shouldn't present a problem to our client when they actually use the app, but it will be a pain in the butt when I'm doing any testing.

Hope this helps point you in the right direction with your investigation.

Thanks,

Chris Powell

Greetings,



You guys are going to start hate reading my posts, if you don’t already. Cool [H]



We found an issue with vertical text not being
displayed the same in Excel vs the Aspose.Grid. I’ve attached a
screenshot with the issue. If text is formatted as vertical in
Excel, it shows up left to right in the Aspose.Grid. Not a show
stopping issue, but it does mess up the formatting of some of our
client’s files.



Thanks for all your efforts,

Chris Powell






Hi Chris,

Thank you for the post. We like your posts because they can help us to shape our products. :)

Nick will check this vertical text issue soon.

Hi Chirs,

I tested the SignatureTest.xls file, it can be loaded. This is my code:

GridDesktop1.ImportExcelFile("c:\SignatureTest.xls")

The font named "Monotype Corsiva" is not handled in GridDekstop control, but the control handles the font as "Microsoft Sans Serif", and the font size is same.

You said "the control throws an exception and doesn't load the file", please post the exception content.

I debugged the program using vb and c# that loading a large excel file in VS 2002, VS2003. The time was as long as outside of Visual Studio. Could you please try the project in another computer?

The "vertical text " is not supported currently. I do some research about it, it seems complex. After I finish the "mouse drag scrolling" feature, I will implement "vertical text" feature.

Thanks

Greetings,

Here is what is thrown into my log file when the font exception occurs.

2006-07-14 08:01:28,432 [3900][FATAL][Imaginet.Foundation.Log]- Exception: Imaginet.Foundation.Exceptions.ImaginetException
Severity: Fatal

No additional info.
Context Information:
AppDomain Name: TGS.MAS.exe
Version: 1.8.2386.11662
Occurred at: 8:01:28 AM
Machine Name:
Thread Identity:
Windows Identity:
Exit Code: 0
OS Version: Win32NT - 5.2.3790.0
Debug information:
Source:
Stack trace: Inner Exception: Font 'Monotype Corsiva' doesn't support style 'Regular'.
Source: TGS.MAS
Stack trace: at TGS.MAS.ucMappingControl.LoadSpreadSheetWithFile(String p_FileName) in C:\Projects\TGS\MAS\_Current_Iteration\TGS.MAS\UserInterface\Mapping Wizard\ucMappingControl.vb:line 314
at TGS.MAS.ucMappingControl.MoveTo(Guid p_MapId) in C:\Projects\TGS\MAS\_Current_Iteration\TGS.MAS\UserInterface\Mapping Wizard\ucMappingControl.vb:line 545
at TGS.MAS.ucMappingControl.NewMap() in C:\Projects\TGS\MAS\_Current_Iteration\TGS.MAS\UserInterface\Mapping Wizard\ucMappingControl.vb:line 971
at TGS.MAS.frmMappingWizard.mnu_NewMap_Click(Object sender, EventArgs e) in C:\Projects\TGS\MAS\_Current_Iteration\TGS.MAS\UserInterface\Mapping Wizard\frmMapWizard.vb:line 237
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) -[Imaginet.Foundation.Logging.Logger.LogFatal(C:\Projects\Imaginet\Foundation\_Current_Iteration\Imaginet.Foundation\Logging\Logger.cs:543)]

About the loading time issue:

We have run our application from VS2003 on 4 machines here, and they all take a really long time to load certain files. The same computers running the same application, but outside of VS2003, load the files in a reasonable amount of time.

I'm just speculating here, but I think it may have something to do with how the control handles formulas that fail due to a divide by zero error. In the files that we are loading with the long load times, there are alot of cells that contain cells with a formula that evaluates to a divide by zero error, simply because they are template files and don't contain the data to correct the divide by zero error.

Here is an example of one of the formulas:

=IF(Y15="","",IF($AC$15="",(Z15/$Z$14*100),($AC$15-Y15-Y14)/$AC$15*100))

$Z$14 is blank, which is probably what is causing the divide by zero error.

There are roughly 60 cells containing similar functions to this one.

Our client hasn't provided us with a sheet that has been populated yet, so I don't know what the loading times would be like if the sheet was properly populated.

Hope this helps with your investigation of the issue.

Thanks,

Chris Powell

Hi Chris,

Which OS are you using, Win2000,WinXP or Win2003?

The machine that I’m running on is Windows Server 2003. The other
machines that we reproduced this on are running Windows XP SP2.

Hi Chris,

There is no "Monotype Corsiva" font in my environment, so, when loading the excel file with the font, the font constructor will create "MS Sans Serif" font instead of "Monotype Corsiva" font, and using the "Regular" style. There is no exception in my environment. Is there "Monotype Corsiva" font in your environment? I modified the code of ImportExcelFile method to create the font object without the "Regular" Font Style. You can try the v1.7.1.3 in attachment. If there is same exception, please post the "Monotype Corsiva" font file.

To locate the problem of "the loading long time", I added an overload method of "ImportExcelFile", the second parameter is "runFormulas", you can set the parameter false not to call RunAllFormulas method when importing.

Thank,

Greetings,



I would appear you hit post without attaching the
file. Smile [:)] I’ll check again when I get into work in the
morning. Then I’ll be able to test it out and let you know how it
goes.



The “Monotype Corsiva” font is either a system font,
or was installed with Microsoft Office 2003. My home computer
here has the font type installed as well, and I only have Microsoft
Works Suite installed on it. I’ll attempt to attach the font
file, but I don’t know how you would go about installing it.



Thanks,

Chris Powell


Hi Chris,

I had fixed the font problem. Please try the v1.7.1.4 in attachment.

Greetings,

Downloaded v1.7.1.4 in your attachment. Using the runformula = False in ImportExcelFile made a huge difference to the load time while running the application in Visual Studio. The load time now is very acceptable.

The font issue is now gone as well. I loaded up a spreadsheet with the ''Monotype Corsiva'' font, and it loaded and displayed correctly.

At the moment, I believe that all that is outstanding is the mouse click/drag and scroll functionality. And I'm sure you're hard at work at it.

Thanks for all your hard work,

Chris Powell

Greetings,

Upon further testing, it would appear that the font issue is not fixed. Its actually worse now. The original problem font works, but now when I try to load several files that loaded successfully before, I'm getting font errors for fonts like "RibbonB1 Bd Bt" and "Univers (WN)". Thing is, I'm can't find any text or cell with those fonts in the files that are giving me trouble now. And I can't find either of those fonts on my system anywhere.

I'm going to go back to using v1.7.1.2 for now until you can figure out what's up with these new font errors.

Thanks,

Chris Powell

Hi Chris,

I fixed the bug, please try v1.7.1.5 in attachment.

Thanks

Greetings,

While testing v1.7.1.5, I ran into an issue with the new overloaded ImportExcelFile method. It doesn't matter whether I set the runformula parameter to true or false, the formulas don't run either way. And when I use the overload with just the filename, the formulas do run, but take longer than they did before. I'm attaching a file that use to load in a couple of seconds (when running the app in Visual Studio 2003), but now takes over a minute. It loads quick if the formulas don't run, but when they do run, it takes a while to load. And this is a spreadsheet where all the formulas evaluate correctly. Again note that his issue only occurs when running the application out of Visual Studio 2003. So its more of an issue while I'm debugging than when the client would actually use it.

The font issues appears to be fixed. I was able to load all the files I did before.

Thanks,

Chris Powell