Skip to main content
Is there a way to specify the sheet name when you open an Excel spreadsheet using the FMEUniversalReader in Python code? I am assuming that there is a parameter that you can add to the open() method, but I have looked at the documentation for the open() method and the parameters are not described.

 

 

Thanks
Hi

 

 

By far the easiest way to do it is to make a call to FMEDialog().sourcePrompt() (http://docs.safe.com/fme/html/FME_Objects_Python_API/fmeobjects.FMEDialog-class.html#sourcePrompt) and print out the results after having specified the sheet name in the dialog box. You can then copy/paste the relevant portions of the result into your production code.

 

 

Example:

 

 

import fmeobjects

 

def FeatureProcessor(feature):

 

    print "-"*72

 

    print fmeobjects.FMEDialog().sourcePrompt('', '')

 

    print "-"*72

 

 

David

Reply