Hi Eike, But there seems to be ( possibly ) be a bug in the
lcl_ScRange_Parse_XL_Header which it seems will always sets some SCA_VALID...2 bits e.g. nFlags |= SCA_VALID_TAB2 | SCA_TAB2_ABSOLUTE - ( if only only single cell address with sheet ref e.g. Sheet1!R1C1 ) or nFlags |= SCA_VALID_TAB | SCA_VALID_TAB2; - ( if just something like R1C1 is passed ) otoh the comments ( certainly for the 'Sheet!R1C1` case seem to indicate this is intentional ) so I changed the routine ( once again ;-) ) while this uncertainty exists - USHORT nRes = aRange.Parse( aOne, pDoc, eConv ); + USHORT nRes = aRange.ParseAny( aOne, pDoc, eConv ); + USHORT nEndRangeBits = SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2; + // nRes & (SCA_VALID_TAB | SCA_VALID_COL | SCA_VALID_ROW | SCA_TAB_3D | SCA_TAB_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_COL_ABSOLUTE); + USHORT nTmp1 = ( nRes & 0x070f ); + USHORT nTmp2 = ( nRes & nEndRangeBits ); + // If we have a valid single range with + // any of the address bits we are interested in + // set - set the equiv end range bits + if ( (nRes & SCA_VALID ) && nTmp1 && ( nTmp2 != nEndRangeBits ) ) + nRes |= ( nTmp1 << 4 ); + if ( (nRes & nMask) == nMask ) Append( aRange ); the above expects that a valid ( non-single ) case will have at least nEndRangeBits set - that I think is not an unreasonable assumption given ScRange::ParseAny tests the same bits in order to decide to try parsing an address. (p.s. I didn't forget about the suggestion for a define for 0x070f, it's just I don't want to trigger a ripple re-compile right now ) Noel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]