Question

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

  • 26 June 2020
  • 3 replies
  • 10 views

Badge

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


3 replies

Userlevel 3
Badge +18

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?

Badge +7

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.

 

Badge +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

Reply