Filemaker - make a field

Dumb question but I can’t make it work and haven’t got time to play with it.

How do I make a new field in an existing database? (I’ve got an excel file with 1600+ field names and need to create them all!)

I’ve got:

repeat with i from 3 to 1680
	tell application "Microsoft Excel"
		set fieldName to formula of cell 1 of row i
	end tell
	tell application "FileMaker Pro"
		tell database 1
			create new field with properties {name:fieldName}
		end tell
	end tell
end repeat

But it gives me the error message: FileMaker Pro got an error: Object or property is not modifiable.

It’s definitely the ‘create’ line that isn’t working!
Help, please!!
Emma

AFAIK, you cannot create fields in FileMaker with AppleScript, only data. What you can do is just open the Excel file with FileMaker. Choose “Excel” as the kind of file to open. All the later versions of FileMaker will ask you if the 1st row are field names, and it will create the fields with the names. It also seems to recognize text, number and date fields. It will not however create calculations for Excel formulas (which are usually similar, but not quite the same).

[I should add that if you are using FileMaker 7, you can only add the Excel file as the 1st table in the file. FileMaker 8 can add it as a new table into an existing file, via the Import dialog (via the target table drop-down at top right) :-]

Not the answer I wanted, but at least I know now and can stop messing about with it!

I really wanted to add these fields to an existing database, but your suggestion may be the best, and I could start a new one and recreate the other fields.

Thanks for your help!
Emma