Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TExcelApplication Open Workbook won't compile


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jun 19, 2017 11:05 AM Last Post By: Pat Ritchey
Bennie Coetzer

Posts: 42
Registered: 12/2/03
TExcelApplication Open Workbook won't compile  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 16, 2017 12:20 AM
Hi, I have scoured numerous examples and believe that my code is correct but my DelphiXE8 Firemonkey compiler won't compile my code. I get a "E2035 Not enough actual parameters" error. I have also tried with all parameters as "EmptyParam"

I use Delphi XE8 with a Firemonkey application and use the Excel2010 unit
  xlApp.Workbooks.open(FileName,
                            false, //UpdateLinks: OleVariant
                            false, //ReadOnly: OleVariant
                            EmptyParam, //Format: OleVariant
                            EmptyParam, //Password: OleVariant
                            EmptyParam, //WriteResPassword: OleVariant
                            EmptyParam, //IgnoreReadOnlyRecommended: OleVariant
                            EmptyParam, //Orign: OleVariant
                            EmptyParam, //Delimiter: OleVariant
                            true, //Editable: OleVariant
                            EmptyParam, //Notify: OleVariant
                            EmptyParam, //Converter: OleVariant
                            EmptyParam, //AddToMru: OleVariant
                            LCID        // Variable returned - can be used to set parameters of Workbook with this ID
                            );
 
 


Edited by: Bennie Coetzer on Jun 16, 2017 12:21 AM
Pat Ritchey

Posts: 10
Registered: 3/9/99
Re: TExcelApplication Open Workbook won't compile  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 19, 2017 11:05 AM   in response to: Bennie Coetzer in response to: Bennie Coetzer
Bennie Coetzer wrote:
Hi, I have scoured numerous examples and believe that my code is correct but my DelphiXE8 Firemonkey compiler won't compile my code. I get a "E2035 Not enough actual parameters" error. I have also tried with all parameters as "EmptyParam"

I use Delphi XE8 with a Firemonkey application and use the Excel2010 unit
  xlApp.Workbooks.open(FileName,
                            false, //UpdateLinks: OleVariant
                            false, //ReadOnly: OleVariant
                            EmptyParam, //Format: OleVariant
                            EmptyParam, //Password: OleVariant
                            EmptyParam, //WriteResPassword: OleVariant
                            EmptyParam, //IgnoreReadOnlyRecommended: OleVariant
                            EmptyParam, //Orign: OleVariant
                            EmptyParam, //Delimiter: OleVariant
                            true, //Editable: OleVariant
                            EmptyParam, //Notify: OleVariant
                            EmptyParam, //Converter: OleVariant
                            EmptyParam, //AddToMru: OleVariant
                            LCID        // Variable returned - can be used to set parameters of Workbook with this ID
                            );
 
 


Edited by: Bennie Coetzer on Jun 16, 2017 12:21 AM

You are missing two parameters (Local: OleVariant and CorruptLoad: OleVariant) between the AddToMru and LCID parameters.

Pat Ritchey [TeamB Emeritus]
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02