Skip to main content

I am writing data into the workspace from AGOL and using a template file in the excel writer, but nothing is being written. What am I missing?

This should be possible, but it is hard to find out what you are missing from the information provided. What is the general idea of your workspace and what does your input and expected output look like?


This should be possible, but it is hard to find out what you are missing from the information provided. What is the general idea of your workspace and what does your input and expected output look like?

Thank you for your response. AGOL data is shown below. I need data in A1 to be written to A14 in the output excel file.AGOLI can get this to work with the writer set to "insert", but it adds new rows above the desired start position. I need data placed in A14 not above it. I realize the writer can be set to "Update" mode. I am unsure how to assign "row ID attribute" or where this row ID attribute should be coming from. Is this something I need to create in source data?

Excel


Thank you for your response. AGOL data is shown below. I need data in A1 to be written to A14 in the output excel file.AGOLI can get this to work with the writer set to "insert", but it adds new rows above the desired start position. I need data placed in A14 not above it. I realize the writer can be set to "Update" mode. I am unsure how to assign "row ID attribute" or where this row ID attribute should be coming from. Is this something I need to create in source data?

Excel

So you want to insert data from AGOL into partially filled in rows in the Excel file? Since columns I,J,K,etc are already partially 'filled' with formulas, FME will append the rows below.

See example:

These are the fields we want to fill:

imageNotice how these fields starts at row 7

 

This is my data in FME:

image 

If we set our Start Row in our FeatureWriter to 7 it will insert the data starting at row 7 (column 1 since we did not specify Start Column):imageWith this as our result:imageWithout specifying Start Row the new rows are simply appended:

imageSo if this is a one time thing it is easiest to just put the starting row in your Writer..

 

But if you wish to automate this, you could try something like this:

Read your Excel data and expose the xlsx_row_id attribute:

image(you could also expose it outside of your reader using the AttributeExposer)

I then applied the following workflow. This can probably be optimized:

imageThese are my FeatureWriter settings:

image.pngAnd this is the result:

image 

Hope this helps.


Reply