From: <prn...@us...> - 2011-12-17 22:34:27
|
Revision: 9426 http://octave.svn.sourceforge.net/octave/?rev=9426&view=rev Author: prnienhuis Date: 2011-12-17 22:34:20 +0000 (Sat, 17 Dec 2011) Log Message: ----------- Fix wrong column address if column no. equals multiple of 26 Modified Paths: -------------- trunk/octave-forge/main/io/inst/calccelladdress.m Modified: trunk/octave-forge/main/io/inst/calccelladdress.m =================================================================== --- trunk/octave-forge/main/io/inst/calccelladdress.m 2011-12-17 17:43:49 UTC (rev 9425) +++ trunk/octave-forge/main/io/inst/calccelladdress.m 2011-12-17 22:34:20 UTC (rev 9426) @@ -29,6 +29,7 @@ ## 2010-10-11 Added check for row range ## 2011-04-21 Added tests ## 2011-04-30 Simplified column name computation +## 2011-12-17 Bugfix for wrong column address if column equals multiple of 26 function [ celladdress ] = calccelladdress (row, column) @@ -39,7 +40,7 @@ str = ''; while (column > 0.01) - rmd = floor (column / 26); + rmd = floor ((column - 1) / 26); str = [char(column - rmd * 26 + 'A' - 1) str]; column = rmd; endwhile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |