I have several excel sheets that have same/similar structures, although some are missing their header names. I can migrate them to SQL Server one-by-one using FME. But I want to loop over the contents of my folder (i.e the excel files) and migrate them all in one go. How do I loop over them? I want to use the same header names for the files missing them as the ones that have them - the header names.
Page 1 / 1
for example,
abc1.xls --> dbo.abc1
abc2.xlsx --> dbo.abc2
...
abc25.xls --> dbo.abc25
abc26.xls --> dbo.abc26
abc27.xlsx --> dbo.abc27
Not a complete answer, but a good start:
Have a look at the "Directory and File path" reader.
That reader returns the names of the files in the folder you point it to.
Then use the file names to crate a table name.
Use a WorkspaceRunner to kick off your workspace that reads and writes one file.
Use published parameters to pass the file and table name to that workspace.
Hope this helps.
Hi @mahdy1989,
I would also use the Directory and File path reader as @erik_jan suggests, however I would use a FeatureWriter in the same workspace to create the tables instead of a second workspace.
Hoet this helps.
Itay