CopySheet does not protect the hidden feature of columns

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
huseyinxy
Posts: 13
Joined: Wed Oct 07, 2015 7:41 am

CopySheet does not protect the hidden feature of columns

Post by huseyinxy »

Hello,

I want to copy one sheet to new one with existing hidden columns, but in the new sheet all columns are visible.

Code: Select all

procedure TForm.Button1Click(Sender: TObject);
var
  fn1, fn2: string;
  Excel: TXlsReadWriteII5;
begin
  fn1 := 'D:\Tests\Excel\temp1.xls';
  fn2 := 'D:\Tests\Excel\temp2.xls';

  Excel := TXLSReadWriteII5.Create(nil);
  Excel.Filename := fn1;
  Excel.Read;

  // add new sheet and copy first one
  Excel.Add;
  Excel.CopySheet(0, 1);

  Excel.SaveToFile(fn2);
  Excel.Free;
end;


larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: CopySheet does not protect the hidden feature of columns

Post by larsa »

Hello

I can't reproduce this. Do you have the latest update installed?
Lars Arvidsson, Axolot Data
huseyinxy
Posts: 13
Joined: Wed Oct 07, 2015 7:41 am

Re: CopySheet does not protect the hidden feature of columns

Post by huseyinxy »

Hello,
I instatlled lastest version 5.20.66.
It can be reproduce with xls files. No problem with xlsx, soryy for this detail
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: CopySheet does not protect the hidden feature of columns

Post by larsa »

Hello

Tested with XLS file and it works correct here. Please send me an excel file that causes the problem.
Lars Arvidsson, Axolot Data
huseyinxy
Posts: 13
Joined: Wed Oct 07, 2015 7:41 am

Re: CopySheet does not protect the hidden feature of columns

Post by huseyinxy »

larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: CopySheet does not protect the hidden feature of columns

Post by larsa »

Hello

Copying your file works fine. Do you have the latest update installed?
Lars Arvidsson, Axolot Data
Post Reply