Hi
When fanout on a xlsx you need to create the the fanout settings under writer->advanced.
I've done it it works like a charm..
I too have a template xlsx file for the writer and then fanout on a field name created from the attributes
Try to see if u can solve it like above..
cheers
andre
Thanks Andre, but that is just how I am doing it, and it does not work as predicted.
Update: Settnig 0 (zero) for sheet order puts the new sheet first, which is an improvement. It would actually work, if it weren't that the excel file is closed with focus on the
second tab which is the empty template sheet.
Hi,
1. a. Does that mean even you have placed "Yes" in "Drop Existing Sheet/Named Range" still dropping of sheet is not happening?
b. "The template sheet is retained, and new sheets are created after it" this will happen when your template has differnet sheet name.
2. Regarding Fanout, Please check both the setting whether you have placed as mentioned...
a. Sheet name will be controlled by "Feature Type Name" in General Tab of Writer Properties
b. File name will be controlled by writer->advanced as Mr.Andre stated
Do let me know your comments, if I understood your question wrongly
Hi Mats
If you in fact create unique xlsx files based on <fieldname>.xls, why do you need to have the sheets within named the same? The template you pointing to has got an existing sheet name. If you omitt the sheet name to be unique it should work just fine, that is set it to be same as template sheet name.
If you do need to have both the file name and sheet name identical then Pratap have given you some ideas to try.
Also, consider wether you actually need to use a template.
regards
andre
Hi Pratap and Andre. Thanks for all hints.
I have done further experiments, and yes, if I do not specify the sheet name, the template sheet name is used, and only one sheet is created. In my case that sheet name became 'template', which seemed silly.
Second, if I want to fan out data in the same excel file, and thus make several named sheets, I see no point in keeping the empty template sheet. This is also how I understood the help file text that I quoted.
Conclusion: With the excel writer, It is not possible to use a template file/sheet AND fan out data on attribute names AND name the sheet with that attribute AND get only one dynamically named sheet in the excel file.
It is, however, possible to fan out data and name sheets as above, NOT using a template.
This cannot be understood from the documentation.
And I wanted to use a template to make a nicely formatted file, as well a machine readable one.
Case closed for my part. Thanks for your attention.
Yes, Excel is bit different from other formats since it has sheets. When you want to use the template then your sheet name also should match. If you want to consider only the headers from template then it is better to use attributes in user attributes tab in excel writer.
If you want 1 excel file and several sheets in it by using the contents of template then you should not use writer --> advanced parameters (Place Fanout Dataset: NO) but you should use only "Feature Type Name" in General Tab of Writer Properties. By this you will get 1 excel file with several sheets as per your template file. Please note even in this scenario sheet name should be matched in template.
If you want several excel files with template sheet then you should use writer --> advanced parameters (Place Fanout Dataset: Yes) as well as we have to create 1 more attribute before writer for Sheet Name with the value as per our template (E.g. SheetName="Template" in your case) and select the "Feature Type Name" in General Tab of Writer Properties with this attribute (i.e. SheetName). So you will get several excel files same as per the template. Please note sheet name will be Template in all the excel files in this case.
Please do let me know if your comments