nicholasjfox
asked on
Delphi/Excel connection problems
I am connecting through ADO Connection and Query to Excel workbook. I have two problems.
1/ The Excel workbook comes to me with spaces in the column titles. Within Delphi is it possible to delete the spaces or change the column names?
2/Having changed the Excel column names manually, I am able to connect and sort the workbook sheets. The workbook appears in a connected DBGrid. However, when I run the following code adoquery1.first; X:=adoquery1['fieldname']. Asstring; label1.caption:=x; I get the following error "Variant does not reference an automation Object' So I need solutions to these two problems, please.
1/ The Excel workbook comes to me with spaces in the column titles. Within Delphi is it possible to delete the spaces or change the column names?
2/Having changed the Excel column names manually, I am able to connect and sort the workbook sheets. The workbook appears in a connected DBGrid. However, when I run the following code adoquery1.first; X:=adoquery1['fieldname'].
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"testresults".