Free Support Forum - aspose.com

Workbook having Worksheets with different layouts

Hi,

I am just learning Aspose.Cells for .NET. I have a workbook that I want to use as a template, because of its formatting. The EXCEL file I am trying to emulate has a different layout and formatting on the first worksheet then it does on all the other sheets. The first worksheet is a "summary sheet" with a certain layout and headings. All the additional worksheets contain "detail information" and different headings than the "summary sheet" at the top. All the detail worksheets have the same headings and layout. The number of detail worksheets can be anywhere from 1 to 20 or more.

Must I use 2 different XLS files as templates to do this? For example, do I open a workbook with the "summary" style and use it to create the first worksheet and then open another workbook that has the "detail" style that I need for the remaining sheets and keep populating and adding those sheets to the original workbook as needed? I guess that would amount to opening 2 workbooks and somehow copying a worksheet from the 2nd workbook into the first one.

Or, is there a way to open a template XLS that already contains 2 worksheets, one "summary" and one "detail". Then I keep creating new "detail" worksheets form the original "detail" sheet as needed?

I can't find any demos or examples that show me how to do this. I imagine that it is a popular request. It would be something like a "Table of Contents" followed by the individual "Chapters".

Thanks for any help...

Hi,

Thanks for sharing your scenario,

Well, your scenario is pretty simple. It 's up to you for your ease that you can either use a single template or work with two templates (summary contents + details). Aspose.Cells has no problem at all with opening any no. of workbooks, copying worksheets, filling data into the worksheet cells or formatting data into the cells. You can do it with ease.

For reference, please check: http://www.aspose.com/Wiki/Default.aspx/Aspose.Cells/

and also explore our featured online demos: http://www.aspose.com/Products/Aspose.Cells/Demos/

Thank you.

Thanks Amjad,

I appreciate the quick response. The Wiki article that you pointed me to was exactly what I needed as an example. For some reason I could not find a similar demo/sample in the Help files that came with the downloaded product.

From now on before I pose a question I will search the Wiki, as there appears to be more examples there.

Have a good day... John