Sherlock, Ric wrote:
I have a few queries regarding Tara and writing biff files and was wondering if
anybody could help.
A) When writing a boxed text array, if some atoms are empty, it seems that those empty cells are actually written as one space. Is this intended? If so it would be good to at least document this. Is it possible to write cells that are truly empty?
It is intended. biff does not allow null string. A single space is used as a
workaround.
B) The wraptext property doesn't seem to have any effect. When I write a cell
with this property, then inspect the workbook in Excel, the cell is not wrapped
and the checkbox in the Format Cells -Alignment dialog is not checked.
Actually tara uses textwrap, I cannot remember this was kept to be bug
compatible with my old applications or not. sorry.
C) How can I include non ASCII characters (eg. micron µ) in a format string?
biff use ucs2 not mbcs or utf8. eg format__xf=: ucp '0.0" µ"'
I get the same behaviour using either Excel 2002 SP1 or 2003 SP2 both on
Windows XP SP2.
Eg.
load 'tables/tara'
bi=: '' conew 'biffbook'
NB. Spaces not empty
txt=:4 3$'Text1';'';'Text two';'3rd Text'
writestring__bi 1 1;<txt
NB. Wrap text doesn't work
xf=: cxf__bi
wraptext__xf =: 1
lstrg=:'This is a really long string'
writestring__bi 6 1;<lstrg
NB.non ASCII in format strings
format__xf=: '0.0" µ"'
writenumber__bi 7 2;15.73
format__xf=: 1&u: '0.0" µ"'
writenumber__bi 8 2;19.34
save__bi jpath '~temp/rictest.xls'
destroy__bi ''
D) Finally, am I right in saying that there is no way to write a numeric array
that contains empty atoms? Eg.
num=: (<i.0) (<2;3)} <&>i.4 5
writenumber__bi 6 1;<num
Once again this is a biff peculiarity and tara is optimised for speed.
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm