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. Image for the cookie policy date

Odd file length (in Rows) limit.

I''ve stumbled across an odd error from Excel under an odd circumstance in the reports I''m generating. The report is an outlined listing with some different styles applied to the different levels in the outline, some merged cells, adjusted cell width, etc ... seemingly nothing complex. With all the sets of data I''ve generated reports from where the last row with data was 565 or less the report opens and looks fine. For any report with data on row 566 or higher I get two "Unable to read file." errors upon openning it in Excel and this weird message that says: --- Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted. --- The report then opens and there seems to be all the data I would expect, but none of the styling/fonts/colors/row&column widths and heights are there. I''ve googled a bit and looked about the MS knowledge base, but haven''t found anything useful. Is this a known problem with Excel/ExcelRW or am I likely doing something wrong?

3 Replies

AD Administrator Syncfusion Team April 7, 2005 06:21 PM UTC

Hi Najati, Please try formatting using excel styles, its a limitation of MS Excel on the individual number of style objects that it holds. //Create Style IStyle myStyle = myWorkbook.Styles.Add("StyleOne"); myStyle.Font.Size=6; myStyle.Font.FontName="Arial"; myStyle.Font.Bold=true; myStyle.FillBackground=ExcelKnownColors.Red; myStyle.Font.Color=ExcelKnownColors.White; mySheet.Range[1,1,100,10].Text = "Hello"; mySheet.Range[1,1,100,10].CellStyleName = "StyleOne"; Thanks, Stephen. >I''ve stumbled across an odd error from Excel under an odd circumstance in the reports I''m generating. > >The report is an outlined listing with some different styles applied to the different levels in the outline, some merged cells, adjusted cell width, etc ... seemingly nothing complex. > >With all the sets of data I''ve generated reports from where the last row with data was 565 or less the report opens and looks fine. For any report with data on row 566 or higher I get two "Unable to read file." errors upon openning it in Excel and this weird message that says: > >--- >Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted. >--- > >The report then opens and there seems to be all the data I would expect, but none of the styling/fonts/colors/row&column widths and heights are there. > >I''ve googled a bit and looked about the MS knowledge base, but haven''t found anything useful. Is this a known problem with Excel/ExcelRW or am I likely doing something wrong?


NI Najati Imam April 7, 2005 07:41 PM UTC

Thanks Stephen, I was afraid it was something like that. This is, of course, the lazy initial draft of the report and I have a lot of duplication lying about. Anothering that I just noted I have duplicated is border settings. Is there a way to store and reapply/share border sets as well? Thanks again!


NI Najati Imam April 8, 2005 09:29 PM UTC

I seem to have come accross a similar problem. This on, however, appears to be related to whether I merge a couple different Ranges. It seems that I can Merge a couple out of a few different sections, but if I try to Merge all of the ranges I get the same behavior as described above. My concern is that by not Merging one of the areas and if someone tries to generate a report that is sufficiently long, even with the scaled back merging, they will run into whatever I''m running into now.

Loader.
Up arrow icon