bugGNU Octave - Bugs: bug #49558, Spreadsheet named range error...

 
 

bug #49558: Spreadsheet named range error relating to sheet names containing spaces or quotes

Submitted by:  Steven Weinberg <wstevena>
Submitted on:  Tue 08 Nov 2016 01:39:28 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Steve WeinbergOpen/Closed: Closed
Release: otherOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 09 Nov 2016 09:21:28 PM UTC, comment #5:

The getnmranges.m file solved the issue I was having in both the test program and the full program.

I am cautiously optimistic that after almost 3 months of running into differences between Octave and Matlab I will finally be able to port a 10,000 line application to Octave.

Steven Weinberg <wstevena>
Tue 08 Nov 2016 11:02:04 PM UTC, comment #4:

I fixed it in the repo and I'll upload a new io release soon [1].
The culprit was having sheet names containing spaces or quotes. They get enclosed in single quotes when requested by the getnmranges functions. So those outer quotes will have to be removed using a regular expression.

Spaces and quotes are allowed AFAIK, but need special treatment.

Thanks for reporting.
The fix works for me wth your example. I'll attach getnmranges.m for you below, also replace it with the one in <io>/private/

[1]
https://sourceforge.net/p/octave/package-releases/279/

(release -> other)

(file #38910)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 08 Nov 2016 09:59:46 PM UTC, comment #3:

Hmmm. Then should the second read have worked, the one with the 'J14' in place of the named range? Could it be defaulting to the first sheet?

I did see the single quotes, but I couldn't figure out where they came from. Is a space an illegal character for a sheet name in Octave (but okay in Matlab)?

Steven Weinberg <wstevena>
Tue 08 Nov 2016 09:34:57 PM UTC, comment #2:

While debugging I find that the sheet name 'DOMINANT UNIT' gets to be included including the single quotes. Obviously that doesn't lead to a match with the sheet names extracted from the worksheet.

You can see yourself in the error message where the single quotes are included.

Hmmm...

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 08 Nov 2016 03:04:32 PM UTC, comment #1:

I neglected to mention that I have IO 2.4.3

Steven Weinberg <wstevena>
Tue 08 Nov 2016 01:39:28 PM UTC, original submission:

error: Worksheet name "'DOMINANT UNIT'" not present
error: called from
_COM_spsh2oct_ at line 84 column 7
xls2oct at line 173 column 25
xlsread at line 202 column 29
du at line 12 column 11

>> wnames

wnames =
{
[1,1] = MAIN
[2,1] = DOMINANT UNIT
}

However if I change the call to:

then the read works. I have also attached the chknmrange.m file I was provided to correct an earlier named range issue.

Steven Weinberg <wstevena>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #38910:  getnmranges.m added by philipnienhuis (2KiB - text/x-objcsrc)
file #38903:  gvarBriefDemo3.xlsx added by wstevena (2MiB - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
file #38904:  chknmrange.m added by wstevena (3KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wstevena (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Nov 2016 11:02:04 PM UTCphilipnienhuisAttached File-=>Added getnmranges.m, #38910
      StatusNone=>Fixed
      Assigned toNone=>philipnienhuis
      Open/ClosedOpen=>Closed
      Release4.2.0-rc3=>other
      Operating SystemMicrosoft Windows=>Any
      SummarySpreadsheet named range error=>Spreadsheet named range error relating to sheet names containing spaces or quotes
    Tue 08 Nov 2016 01:39:28 PM UTCwstevenaAttached File-=>Added gvarBriefDemo3.xlsx, #38903
      Attached File-=>Added chknmrange.m, #38904

    Back to the top


    Powered by Savane 3.1-cleanup1