Equivalent to Aspose.Words.StructuredDocumentTag in Cells?

Hi


I have implemented a feature where a solution can interact with Word documents, by filling out or reading values from Sdt controls. The Sdt Controls are each given a Tag value that identifies the content of the tag.

This enables me to create/update a Word document from the solution, let the user fill out the document, and upon save/close of Word I can read out the values and persist the values in a database.

I now have a feature request for obtaining the same functionality for Excel (Aspose.Cells).
What is the best practice for doing this in Excel?

What I need is:
- a way to identify where to insert values (same value can be put multiple places, several cells in Excel can have same Tag value)
- a way to find what the users has entered in the cells (if multiple tags, just the “first” that matches the tag value)
- If possible a way to programmatically remove the fields if an Excel sheet is to be sent to external systems/parties
- If possible the same as Word Sdt where you can define if it is a Date, DropDown, text or checkbox field)

I hope some of you have experience with this and can give a headstart on what works - and what doesn’t work.

Best regards
/Anders


Hi,


We are not entirely certain about your requirements. Do you need to Find/replace or delete some cells that have special value (tag)? Here, you may use Aspose.Cells Find/replace feature if required. If you want to get/modify shapes, you can access the ShapeCollection in the sheet, to check whether one cell is DateTime, you may use Cell.GetStyle().IsDateTime attribute to determine if the cell value is DateTime or not.

Also, give us more details, sample Excel files and screen shots. How could you perform the task in MS Excel manually for your requirements, this would help us to evaluate your issue/ needs precisely on our end.

Thank you.

Hi


I am asking because I don’t know how to do it properly in Excel - but maybe an Excel forum would be better fit for the question.

Our customers has Excel files they want to use like forms. The solution should then be able to fill certain fields with values. Our solution should not know about where the cells are, so we can’t use cell numbers for reference.

The example I have attached is from one of the templates in Office, and it seems it uses named ranges. That might be one way of doing it. Having Forms Controls inserted may be another. And having a hidden “reference” sheet that maps cells with tags could be a third.
My question was more about what which of the above that would be the easiest to work with in Aspose - to keep my code as simple and maintainable as possible.

Hi,


Thanks for the template file.

I have evaluated your sample file. Well, we think creating named ranges and inserting/updating data using them is easier and efficient for your requirements. Please see the document/ article on Named Ranges for your reference:
http://www.aspose.com/docs/display/cellsnet/Named+Ranges

Thank you.

Thanks for your feedback.


/Anders