Hi,
I have an error when i tried to set a column width in my excel file with xlsreadwrite version 4.00.15
I put this code
XLS.Sheet[0].Columns[0].Width := 12;
and i have an access violation in the unit Columns4.pas on the Fwidth := Value; in this procedure
procedure TXLSColumn.SetWidth(Value: integer);
begin
if (Value < 0) or (Value > $FFFF) then
raise Exception.Create('Invalid value');
FWidth := Value;
end;
FWidth is an inacessible value and i don't know why ?
It is a bug or my error ?
thanks
Column Width result an access violation
Re: Column Width result an access violation
Hello
You must first ensure that there is a column object. Use XLS.Sheets[0].Columns.AddIfNone(Col,Count).
You must first ensure that there is a column object. Use XLS.Sheets[0].Columns.AddIfNone(Col,Count).
Lars Arvidsson, Axolot Data
-
- Posts: 3
- Joined: Tue May 17, 2005 9:54 am
- Location: Farnborough, UK
- Contact:
Re: Column Width result an access violation
How do I count the number of columns on a Sheet?
I know that I have written some columns and some sheets, but each instance will be different, and I want to auto size all the columns
You have a count of the number of sheets, but how do I get this for Columns
I know that I have written some columns and some sheets, but each instance will be different, and I want to auto size all the columns
You have a count of the number of sheets, but how do I get this for Columns
Re: Column Width result an access violation
Hello
What has your question to with the postings in this thread? Also, this thread is 6 years old. Please start a new thread.
What has your question to with the postings in this thread? Also, this thread is 6 years old. Please start a new thread.
Lars Arvidsson, Axolot Data