Skip to main content
Solved

WORD EXCEL write on specific location


alc33
Contributor
Forum|alt.badge.img+10
  • Contributor

Hi!

I have a .docx document framework (template) and I would like to insert specific "field" with QuickPart or anything like that on the document. Then, with FME, write data on this specifics locations.

Is it possible? I think not because I read on the Microsoft Word Writer description "The writer can either create a new document or append to the end of an existing template document ".

Maybe with programmation?

The same question on excel. I would like to write on named cells (like A2 is named "VALUE1" for exemple) in the best case scenario. Or if is not possible, write on the same sheet but on differents locations specified by number row/column. But when I duplicate writer, I can't give the same sheet name. Maybe do a series of FeatureWriter, but I don't succeeded.

Thank for your answer.

Best answer by ebygomm

For writing to a specific location in Word, I'm not sure it's possible with the writer (unless there have been changes in 2019). You could take a look at using the python docX library.

For writing to specific locations in excel, you can use a single writer and use attributes on each feature to specify where the records should end up. You can also write to specific named ranges.

 

View original
Did this help you find an answer to your question?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • July 3, 2019

For writing to a specific location in Word, I'm not sure it's possible with the writer (unless there have been changes in 2019). You could take a look at using the python docX library.

For writing to specific locations in excel, you can use a single writer and use attributes on each feature to specify where the records should end up. You can also write to specific named ranges.

 


alc33
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • July 4, 2019

thanks for your answer.

It'z crazy, I spent time looking for how writing on named ranges and founded nothing. But with the tag "write to specific named ranges" I find the solution quickly. I put the link below :

https://knowledge.safe.com/articles/34364/using-a-template-file-when-writing-excel-data.html

I just set "output field name" to "No" for have just the value on the named range.

For Word I will look for with python.


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