We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

non sparse data?!

Thread ID:





38882 Dec 20,2005 06:03 PM UTC Jan 13,2006 02:48 PM UTC WinForms 2
Tags: XlsIO
Asked On December 20, 2005 06:03 PM UTC

My task was to obtain an overall worksheet format/color from an XLS file to preset ours before importing. Not knowing where to get this (the default may not be it, if the user selected the whole sheet and chose a different font, as an example), I decided upon the far bottom right corner (worksheet.Range[65536,256]) as a probable unused that would indicate a better guess for the overall sheet formatting. After requesting this range and fetching its properties, a foreach loop through the worksheet.Cells collection fried. The ultra small test file I used claimed a Cells collection of 6, so I changed my Range request to Range[10,10] and lo and behold, the worksheet.Cells collection claimed 100 cells! Oh my gosh! So requesting the far bottom right causes an instantiation of 65536*256 cells?! (or worse, 65536^2) Aweful! For now, my workaround is to fetch the last cell in the collection, and use its row and its cell+1 (which causes my cell collection to increase, but not by as much) for the Range of the unknown cell that I will fetch CellStyle information from. I look forward to an explanation, as it seems that XLSIO will only be able to handle small sheets, and can''t even handle small ones if a single cell is far away. -Greg

Administrator [Syncfusion]
Replied On December 22, 2005 02:51 PM UTC

Hi Greg, I will investigate into this issue and post an update soon. Thanks, Stephen.

Administrator [Syncfusion]
Replied On January 13, 2006 02:48 PM UTC

Hi Greg, Sorry for the delay in getting back to you. 1) Your original problem of having to get the default styles that are used in a worksheet would be possible as soon as this feature is implemented http://www.syncfusion.com/support/features/xlsio/Default.aspx?ToDo=view&questId=684 When a user uses Select All in excel and changes some formatting, the default column styles of columns 1-256 are assigned a default style so once this feature is implemented you would be able to read the default style by reading the default column style. 2) I investigated this issue and found that you were correct in saying that XlsIO has a problem working with sparse data and there seems to be no way to enumerate through the collection of used cells in a worksheet. I have notified the development team and we will address this issue with the highest priority. Thanks for reporting this issue. Best regards, Stephen.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon