Skip to main content

Has anyone tried running the ExcelToPDFWriter in an FME flow? I’m encountering an issue where Excel cannot open the file when I run this transformer in the FME flow. However, I don’t face this issue when running it directly in FME Form. Any insights or solutions would be greatly appreciated!.

 

I found the sloution here : Microsoft Excel cannot access the file (Java -> cmd /c python -> Excel) - Stack Overflow

 

Have you uploaded the transformer to FME flow? Do you have the correct python libraries installed?


Yes and installed the correct python libraries: When I run it on FME flow , I recived this error: 2024-10-1 11:57:53 | Python Exception <com_error>: (-2147352567, 'Exception occurred.', (0, 'Microsoft Excel', "Microsoft Excel cannot access the file '\\\\nlutrce.resource.local\\fme$\\FME_Data_Test\\datastore\\SRCOR_00_00_01_FOTO\\79516_ED904-A375-43C8-8B41-C83A018A162C - kopie.xlsx'. There are several possible reasons:\n\n• The file name or path does not exist.\n• The file is being used by another program.\n• The workbook you are trying to save has the same name as a currently open workbook.", 'xlmain11.chm', 0, -2146827284), None)


I checked the transformer and what it does is call Excel through Python to do the actual transformation. This does require that Excel is installed on the same machine as FME Flow and that it has access to the location where the .xlsx files are. Based on the error message it appears that that may be the case, or that the file is already opened in another application.

 

You may also want to consider contacting the author of the workspace directly to see if he can help you. 


Excel is installed on the same machine. Did you tried to run it on FME flow? I need to know if somone succeed to run it on fme flow . Thanks in advance

 


Does FME Flow have access to the location where the Excel file is located, using the path that is given?


Yes FME flow has access to the location. Did you succed to run it on FME flow?


I don't have Excel installed on my FME Flow environment (and I can't install it there), so unfortunately I cannot test the transformer.

Can you successfully read the Excel file on FME Flow with another transformer, like a FeatureReader?

Something like this:

 


Yes, it read and wrote the data successfully. However, I believe something unusual happened between FME flow  and Excel.


Maybe the custom transformer is broken. ExcelToPDFWriter is over 6 years old, and has never been updated.


It works in fme Form so I think the problem in FME Flow , it changes the original input path from:

'\\nlutrce.resource.local\fme$\FME_Data_Test\datastore\SRCOR_00_00_01_FOTO\79516_ED904-A375-43C8-8B41-C83A018A162C - kopie.xlsx'. to:  '\\\\nlutrce.resource.local\\fme$\\FME_Data_Test\\datastore\\SRCOR_00_00_01_FOTO\\79516_ED904-A375-43C8-8B41-C83A018A162C - kopie.xlsx'.


That may just be a way of escaping the \.

As a test, does it work when you place the Excel file somewhere in the Resources folder on the FME Flow machine, and try to convert it from there?

Or another approach, the problem may also be that there are spaces in the file name.


I did it  but it did not work , same error

 


Reply