Unable to open SpreadsheetML that contains a named range of an entire row

Hi,



When I open a SpreadsheetML that has named range of an entire row, the following exception is thrown:



System.ApplicationException: Invalid formula in cell @0: =Sheet1!R1:R1



Here’s the code snippet that I’ve used to produce this:



var grid = (new Workbook()).Worksheets[0];



var range = grid.Cells.CreateRange(0, 1, false);

range.Name = “MyRow”;



grid.Workbook.Save(string.Format("{0}TemplateHasAnEntireRowAsANamedRange.xml", TestHelper.TemplateDirectory), FileFormatType.SpreadsheetML);



var workbook = new Workbook();

workbook.Open(string.Format("{0}TemplateHasAnEntireRowAsANamedRange.xml", TestHelper.TemplateDirectory), FileFormatType.SpreadsheetML);



-Steve

Hi Steve,

Thanks for providing us the details.

Yes, we have found the issue after an initial test using your code, it seems that the problem is only with creating a named range based on an entire row only as named range based on an entire column works fine. We will figure it out soon.

Thank you.

Hi Steve,

Please try this fix.

We have fixed this bug.

Thanks for your info.

This fix works except in one case. When I have a named range of an entire row that contains just one row it fails with an “Index was outside the Bounds of the Array” exception.

This is a SpreadsheetML that is exported out of the Office Web Components Spreadsheet component and the RefersTo attribute has an address of Sheet1!R35. If I manually change this address to Sheet1!R35:R35 it works. This is not an issue for entire columns containing just one column. I.e. Sheet1!C1.

Harry (colleague of Steve)

Hi,

Please try this fix.

If you still get any error, please post your template file, we will check it soon.Thanks for your patience.

This fix didn’t work.



I have attached a SpreadsheetML file that has one NamedRange called Test that contains only one row.

Hi,

Please try this fix in http://www.aspose.com/community/forums/149739/something-has-changed-in-the-save-to-pdf/showthread.aspx#149739

We have fixed the bug in importing SpreadML file.

Thanks.



This fixed worked.



Harry

The issues you have found earlier (filed as 6776) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Laurence.