Skip to main content
Question

ExcelToPDFWriter


fares
Contributor
Forum|alt.badge.img+5
  • Contributor

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

 

12 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • October 1, 2024

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


fares
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • October 2, 2024

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)


redgeographics
Celebrity
Forum|alt.badge.img+49

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. 


fares
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • October 2, 2024

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

 


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • October 2, 2024

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


fares
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • October 2, 2024

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


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • October 2, 2024

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:

 


fares
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • October 3, 2024

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


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • October 3, 2024

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


fares
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • October 4, 2024

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'.


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • October 4, 2024

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.


fares
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • October 4, 2024

I did it  but it did not work , same error

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings