Append an existing Excel file using model builder

1633
3
05-22-2018 02:06 PM
ScottDeNeice
New Contributor

Hello,

I am trying to create a model that will extract data from a feature data service hosted in AGOL into a fgdb, (using the Download Service tool) and then create a query layer (to insert columns into a new table where there are many case statements like if column a is null use column b (CASE WHEN column a IS NOT NULL THEN column a ELSEcolumn b END AS newcolumn).  The last step is to export that data into a formated xlsx file, where the xlsx file has the column names and several other columns have built in expressions to calculate data from columns in the spread sheet.  Is it possible to do the last step in model builder.  I know I can create a new xlsx file using the Table to Excel tool, but do not see any way to export to an existing xlsx.  I am using ArcGIS Pro 2.1.2.  My python is limited to exporting a model to a script and make some slight modifications, so not an expert in actually programming with python.

Thanks

0 Kudos
3 Replies
JoeBorgione
MVP Emeritus

I believe the only way to add data to an existing workbook is to add a new worksheet with  panda....

That should just about do it....
ScottDeNeice
New Contributor

Thanks.  I figured that was the case but was hoping someone knew a way around it.

0 Kudos
JoeBorgione
MVP Emeritus

It's really pretty easy to run;  see my repsonses to Export multiple tables in GDB to Excel with a new sheet for each table.  

That should just about do it....
0 Kudos