Hello Lars,
As you tell me, i've finally made a new registration. Thanks for your attention.
I'm trying to migrate code from v4 to v5 and i've some difficulties because many changes have been made in the component code. The few indications done in the changes.txt file are not enough to migrate.
Is there an exhaustive document describing how to migrate code from v4 ?
If not, what are the new names of the following v4 units ?
1. XLSFonts4
2. CellFormats4
3. Cell4
How can i replace these statements ?
4. XLS.Sheets.DrawingObjects.Pictures.Clear
by XLS.Sheets.Drawing.BIFFDrawing.Pictures.Clear
or just by XLS.Sheets.Drawing.Clear
5. XLS.formats[0].NumberFormat := 'dd/mm/yyyy';
by XLS.CmdFormat.Number.Format := 'dd/mm/yyyy'; ?
6. What is the corresponding value for "ctNotUsed" in the "TXLSCellType" type ?
7. XLS.Sheets.Columns.AddIfNone(n, 1); ? because AddIfNone is deprecated
8. XLS.FileName := 'file_path';
XLS.Read;
XLS.Sheets[0].LastCol := 4; <= ReadOnly now
XLS.Sheets[0].LastRow := 50000; <= ReadOnly now
thanks for your help.
jleg
Migrating code from v4
Re: Migrating code from v4
Hello
1. TXc12Font
2. Use XLS.CmdFormat when formatting cells. See sample.
3. Same as above.
4,5 Yes.
6. xctNone
7. AddIfNone is not required anymore. The method is now empty and just kept for backward compability.
8. Use CalcDimensions
1. TXc12Font
2. Use XLS.CmdFormat when formatting cells. See sample.
3. Same as above.
4,5 Yes.
6. xctNone
7. AddIfNone is not required anymore. The method is now empty and just kept for backward compability.
8. Use CalcDimensions
Lars Arvidsson, Axolot Data
Re: Migrating code from v4
Hello,
For my 4th question, you answered "Yes" but there were 2 solutions, what is the good one :
4. How to replace
by
or just by
jleg
For my 4th question, you answered "Yes" but there were 2 solutions, what is the good one :
4. How to replace
Code: Select all
XLS.Sheets[i].DrawingObjects.Pictures.Clear
Code: Select all
XLS.Sheets[i].Drawing.BIFFDrawing.Pictures.Clear
Code: Select all
XLS.Sheets[i].Drawing.Clear