Skip to main content
Question

How to read an excel file, and write to the same file that FME is reading?

  • June 26, 2020
  • 3 replies
  • 120 views

Forum|alt.badge.img

I receive an error when I try to read and write to the same excel file, is there something that I'm missing?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

becchr
Influencer
Forum|alt.badge.img+33
  • Influencer
  • June 26, 2020

hi @rocky12, i've done this before by reading the excelfile and using the same file as a template for the (new) file i write, maybe this helps?


tomf
Supporter
Forum|alt.badge.img+23
  • Supporter
  • June 27, 2020

Hi @rocky12,

It sounds like the excel file is still open for reading when FME attempts to start writing to the same file. One thing you could try is to place a FeatureHolder immediately before the Writer to delay the writing operation enough to finish the reading operation. If that's not quite enough you could also add a Decellerator (probably only a fraction of a second may be required here) before the FeatureHolder to add a further delay.

 


Forum|alt.badge.img+2

You most likely have the sheet open in Excel and it's generating a sharing violation.

 

I typically use a split access database. Access hosts the tables and excel displays through a database connection. It makes it easy to load data and avoids locking.

 

https://support.microsoft.com/en-us/office/split-an-access-database-3015ad18-a3a1-4e9c-a7f3-51b1d73498cc