How to access/edit existing Schedule data cells with the API?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Ideally I would like to be able to create a Schedule from scratch with the four columns I want, but that part can be done with the Revit UI almost as easily. The thing I would like to do is be able to number sheets in a Sheet Schedule so that they are then ordered by those numbers. Basically sheets numbered Txxx come first, then Zxxx, then ENxxx and so on. I can write the logic to order them the way we need them, but I just don't know how to access and edit the text within the cells of the schedule to do this. Also if a sheet gets added to the project, I would like the schedule to correctly number it according to these rules. Not sure if that part is doable, I could always just create a new schedule if sheets are added.
I attached an image. So right now we have to manually enter the numbers in the "Sheet # in contract" column. I would like a macro that looks at the sheet number column, orders all of them according to our conventions(in this example T sheets first, A second, S third etc), numbers them once they are ordered, and then fills those numbers in the "Sheet # in contract" column. So yea basically I would like to know how to access and edit that raw text in those data cells.