Problem with CreateRange?


#1

Hi,

The documentation and intellisense states that Cells.CreateRange takes two pairs of row and column numbers ie. row, column, row, column. However the following code illustrates that Aspose.Excel is transposing the order of the two pairs, ie column, row, column, row:

static void Main(string[] args)
{
Excel m_XLSStatement;
string LicensePath = “c:\Aspose.Excel.lic”;
StreamReader licenseStream = new StreamReader(LicensePath, UnicodeEncoding.UTF7);
m_XLSStatement = new Excel(licenseStream);
Worksheet outWS = m_XLSStatement.Worksheets[0];
Range range = outWS.Cells.CreateRange(1, 5, 9, 1);
range.Name = “TestRange”;
m_XLSStatement.Save(“c:\ABTest.xls”, FileFormatType.ExcelXP);
}

Any idea why? We are using v1.7.3.2. Flavours of version 1.6 seem to be OK.

Andy


#2

Dear Andy,

Thanks for your help.

Yes, that’s a bug. In v1.7 I have done some internal modification and that causes this small bug. I fix it in fix 1.7.4.3. Please download it.

Sorry for the inconvenience.