Row insert operation doesn't correct formula

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
ykarapinar
Posts: 22
Joined: Fri May 17, 2013 7:59 am

Row insert operation doesn't correct formula

Post by ykarapinar »

Row insert operation doesn't correct the existing formula in some cases

Code: Select all

  XLSReadWriteII51.FileName:='C:\XLSRW.xlsx';
  XLSReadWriteII51.Sheets[0].AsFloat[1, 2]:=10;
  XLSReadWriteII51.Sheets[0].AsFloat[1, 3]:=20;
  XLSReadWriteII51[0].AsFormula[1, 1]:='B3/B4';
  XLSReadWriteII51[0].InsertRows(2, 1);
  XLSReadWriteII51.Formulas.Calculate;
  XLSReadWriteII51.Write;
after inserting row, formula have to change to 'B4/B5', but it's still 'B3/B4'
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Row insert operation doesn't correct formula

Post by larsa »

Hello

This is fixed in update 5.20.27
Lars Arvidsson, Axolot Data
utmost
Posts: 1
Joined: Thu Oct 25, 2012 5:21 am

Re: Row insert operation doesn't correct formula

Post by utmost »

if formula contains mixed references like this "=IF(K15=0;"";SUM($K$14:K15))" then its copied as "=IF(K15=0;"";SUM($K$14:$K$15))" last reference must be K15 not $K$15.
edit: if using xls format
Post Reply