This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I need to export a list of entities to MS Excel. Any thoughts on the best way to implement this? Thanks! |
|
|
There's nothing built into LightSpeed that will help with this, so you'll need to fall back on good old-fashioned file I/O. Just write the entities out to a CSV file and Excel will happily read it in. For maximum generality, you could design the CSV writer to use reflection over entity properties: depends on the relative priority of reusability vs. performance. If you do use reflection, watch out for associations and the base class properties like Errors and ChangeTracker that you won't want to write into the CSV. |
|
|
It would be nice if LightSpeed exposed metadata of what data properties an entity has and a mechanism to make values accessable using a data property as a key. That would avoid the need for error prone reflection. |
|
|
Hi, Seems like my problem i'm getting now. I already have an existing business fascade that uses .NET reflection to traverse through the properties of an entity. I just wanted to change my data layer side to use LightSpeed... however, since the entities for LightSpeed requires you to inherit from the "Entity Maybe it is worth looking at implementing entities with pure data fields only (POCO) without the additional lightspeed properties or methods. Thanks, JM |
|