TextMate simply won't handle the file but I was able to open it in FireFox.

Looking at the XML for these two cells in the \xl\worksheets\sheet1.xml
file:

<c r="R40" s="52">
  <f t="shared" si="58"/>
  <v>0</v>
</c>
<c r="S40" s="52">
  <f t="shared" ref="M40:V42"
si="59">SUMIF($AI$3:$JN$3,S$36,$AI40:$JN40)</f>
  <v>0</v>
</c>

My assumptions are that <f> is "formula", t = "type", si = "shared index"
and <v> = value.  The formula in R40 was copied from cell C40, and its entry
shows:

<c r="C40" s="52">
  <f t="shared" ref="C40:R42"
si="58">SUMIF($AI$3:$JN$3,C$36,$AI40:$JN40)</f>
  <v>642500</v>
</c>

Evaluating the cells using POI (in a JRuby app) shows the following two cell
formulas:

R40 = SUMIF($AI$3:$JN$3,R$36,$AI40:$JN40)
S40 = SUMIF($AI$3:$JN$3,*Y$36*,$AI40:$JN40)

Clearly something is amiss with the Y$36 reference in S40 -- it should be
S$36.  The SUMIF for T46 likewise shows what looks to be the correct formula
in the XML file but POI shows the 2nd param to the formula to be AA$36
instead of T$36.

I hope this info is helpful.

Cheers, and thanks,

Chris

On Tue, Aug 9, 2011 at 8:57 AM, Chris McCann <[email protected]> wrote:

> Nick,
>
> Exactly my thinking but for some reason trying to open the unzipped XML
> file using TextMate clobbered my machine.  Not sure what's up there but will
> try to find a workable solution to opening it.  I'll report what I find
> here.
>
> Cheers,
>
> Chris
>
>
> On Tue, Aug 9, 2011 at 4:32 AM, Nick Burch <[email protected]>wrote:
>
>> On Mon, 8 Aug 2011, Chris McCann wrote:
>>
>>> Tracing into the formula that's causing the problem I found an odd
>>> situation.  Looking at the formula in Excel (using Excel Mac version
>>> 12.2.6)
>>> I see the formula for cell U46 is listed as:
>>>
>>> =SUMIF($AI$3:$JN$3,U$36,$AI46:**$JN46)
>>>
>>> When I call cell.get_cell_formula using POI, though, I get:
>>>
>>> U46 = SUMIF($AI$3:$JN$3,AB$36,$AI46:**$JN46)
>>>
>>> The NPE is being raised because there's no value in AB36.
>>>
>>
>> The key question is what has been stored in the xlsx file? If you unzip
>> the .xlsx and then look at the sheet xml file for the sheet with the problem
>> formula in, you should be able to find the cell xml (there's a reference on
>> it with the cell's location). What has excel stored there?
>>
>> Nick
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: 
>> [email protected].**org<[email protected]>
>> For additional commands, e-mail: [email protected]
>>
>>
>

Reply via email to