BIRT Exchange Forum: setDefinedName and spaces in the sheet name - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

setDefinedName and spaces in the sheet name com.f1j.util.F1Exception: Invalid name. Rate Topic: -----

#1 User is offline   meindert Icon

  • Junior Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 05-December 08


Posted 04 May 2011 - 02:17 AM

I try to use setDefinedName to reference a worksheet-level value for a sheet with a space in the worksheet name:
String cellName="'APA Report'!NVEH01";
book.setDefinedName(cellName, "12.5434");
reportSheet.setFormula(2,4,cellName);



This code results in:
com.f1j.util.F1Exception: Invalid name.

The API documentation says;
When you create a defined name, the following rules apply:
■ A worksheet-level defined name begins with the worksheet name, followed
by an exclamation point. For example, any defined name on the Expenses
worksheet must begin with 'Expenses!'

How can I use a worksheet name with a space?
0

#2 User is offline   RussW Icon

  • Member
  • Group: Members
  • Posts: 104
  • Joined: 07-August 07


Posted 05 May 2011 - 02:29 PM

Try adding the defined name without the single-quote characters, e.g.:
String cellName="APA Report!NVEH01";

Quotes are needed when referring to the defined name within a formula.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users