Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8752 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to automate a records export - from FMP 5 to Excel 97 - so that users can easily transfer information by means of a single button.

I can do this with the 'Export' script step - but this leads me into problems with the destination file name. If a user is exporting data on a daily basis to the .slk file, I'll have to come up with a way of deleting the old file before creating the new (every day and for every user).

I think a simpler way to achieve the result desired is to copy the data, then paste it into an Excel file (I think DDE should allow me to make a filename the product of a calculation; so I can make sure each file generated is unique).

I wanted to have Excel run a macro to paste the record data into the file (and another macro before this to paste the title data into the first row, etc).

Now, I can get all this to work - but only occasionally. For some reason, wholly inexplicable to me, the DDE command line

[RUN("macroname")]

works - but only occasionally!

I've tested the copy part of my script (by going to Notepad and pasting; yes, the copied data appears).

I've tested the macro part of the script (by going to the Excel file and running the macro; it, too, pastes the data from the clipboard).

Why, then, is it not working altogether? Or, bizarrely, only sometimes?

Posted

quote:

Originally posted by Wotan:

I'm trying to automate a records export - from FMP 5 to Excel 97 - so that users can easily transfer information by means of a single button.

I can do this with the 'Export' script step - but this leads me into problems with the destination file name. If a user is exporting data on a daily basis to the .slk file, I'll have to come up with a way of deleting the old file before creating the new (every day and for every user).

The export will overwrite the file each time. There should be no need to delete it first.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

Kurt,

You're right about the export overwrite. Thanks for that.

Trouble is, I still don't get the functionality I'm after.

With DDE I can paste info into a file and then run macros (to create titles, generate graphs, etc).

I'm wondering whether the problem might be that I'm running the solution under NT - which handles application memory differently from Windows. I think it 'seals' each application from any others running - or, at least, has the potential to do so (which would explain how my script works only occasionally - i.e. when the memory is not doing this). So sometimes I'm sending DDE messages that are going nowhere/rebounding off the memory partition.

Has anyone else experienced this problem in NT?

If so, is there a way round it that will ensure that the messages get through for every client (without having to reconfigure every one of their PCs)?

Posted

quote:

Originally posted by Wotan:

Kurt,

You're right about the export overwrite. Thanks for that.

Trouble is, I still don't get the functionality I'm after.

With DDE I can paste info into a file and then run macros (to create titles, generate graphs, etc).

In this case, use Filemaker scripting to export the file and then run a DDE Execute to start the Excel macro. Then do everything else within Excel.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

This topic is 8752 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.