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

"Automatically open" Exported Excel File with FM Server


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

Recommended Posts

Posted

Hi;

In my script Filemaker pro 11 , I used the function :

Export records [No dialog; “<output filename>”; Automatically open>]

This script is used like a schedule script which running every 20mn from the filemaker server; what I need , is to export records from the DB as an .XLS file than Open this file automatically in the server !!! when I test the script in my descktop , I receive the exported files and it will be " automatically opened" But , on the Server , That can't be open automatically !!

what shoud I do please to open exported files automatically in the server ??!!!

 

 

Posted

What's the purpose of having the file opened on the server?

 

What directory are you saving it to? I believe FileMaker Server can only export to it's Data/Documents directory or temp directory.

Posted

Hi dansmith65;

I create an Excel macro what run just for any open Excel file ..That's why I need to open automatically .xls files exported from the filemaker pro 11 DB.

Exported files will be saved in a specific directory of FM server .

Have you please a solution ??

Posted

What directory are you saving it to? I believe FileMaker Server can only export to it's Data/Documents directory or temp directory.

Posted

Is the "Perform Without Dialog" option checked or unchecked?

 

And if you're going to have the Excel file in any directory other than where FMS can export, you'll have to move it there with an OS level script.

 

Also, please see this article:

 

http://fmforums.com/forum/topic/64713-server-side-imports-and-exports/

 

Steven

Posted

 

I create an Excel macro what run just for any open Excel file 

 

I'm not following this?  You can't have an excel macro in a excel file that you've just created through an export by FM.  How would the macro have gotten in the file??

 

Nothing should run on the server that requires a UI to be drawn because there is no user space for that.  My feeling is that there is probably a better way to do what you want to do but you'd have to explain the complete business logic.

 

One intermediate solution would be to write a VBscript that uses the Excel ActiveX interface but avoids drawing a UI.  That way you can still use all the excel features without actually launching excel in a user space.   Your error handling will have to be top notch because as soon as excel would throw an error (= dialog) your routine will stall with no way to get out of it except by killing the excel process.  Again not something you want to be doing on a server.

Posted

Hi Steven;

 

the "Perform Without Dialog" option is checked.

And I m going to have the Excel file in the directory where FMS can export,

The problem is; Why when FMS export excel records , he can't open files automatically ??

 

jabrane

Posted

Hi Wim Decorte;

Would have gotten the macro in the "Personal.xls" file; defalut The file by MS Office Excel Which can run the macro for Any Excel file.

Im not executing anything on the server, only the macro will be executed automatically each time you open any Excel file .

 

I will explain the complete business logic:
1/FMS exporting records from FMP as Excel files with a scheduled FMS script ( every 20 mn ).

2 / to open the exported Excel file, a macro is triggered automatically , copy records from an open excel file in a new Word files (model on which the records must be saved )

3/The macro sends emails to users, after the recording of the new word documents, word processed documents containers from Excel files and closes the application.

Everything works very well except that the excel file does not open automatically in the server
exported excel files are placed in the directory of FMS.

Be afraid there's probably a better way to do what I want to do and thank you in advance for your assistance.

Posted

Take the code that you would otherwise put in the Excel macro, convert it to VBscript then make your FMS schedule a "script sequence" schedule that first runs the FM script to export the excel files, then runs the VBscript to process the excel files.

 

I'm not sure that any Excel macro code (or VBscript that does the same thing) can email from the server, unless they use SMTP directly (which I'm not sure that they can).

Posted

Hi  Wim Decorte;

 

I create the Excel macro in the server; and it works . My Excel VBA Macro can send email from the server by using the SMTP.

I create also the FMS scheduled script that export record from the FM DB.

Now, I want to open the exported Excel files automatically in the server, just open them , then , The macro will run .

thank you

Posted

I give up.  Opening Excel (= desktop application) is NOT a good idea on a server.  The server should run with no user logged in so launching a UI application like Excel is going to lock up your server at some point.

 

Most anything you can do with VBA, you can do with VBscript.  You would still have to make sure the VBscript uses the Excel ActiveX in such a way that no UI or Window is  ever drawn, so the error trapping and handling would have to be very robust.

 

So go the VBscript route or find a completely different way to achieve what you need to do.  One option is to use a robot workstation to run this process instead of running it on the server.

  • Like 1

This topic is 4375 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.