Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
xamSpreadsheet
posted

I would like to save a table in a worksheet to database. Is it possible to access worksheet data in code preferably through MVVM. Is there a worksheet object.

Parents
No Data
Reply
  • 2151
    Offline posted

    Hello Nalin,

    Currently there are no methods for saving and loading data to and from a single worksheet or a worksheet's table. However, you can iterate over the worksheet's cells and access their data like this:
    Workbook.Worksheets[0].Rows[y].Cells[x].Value

    There are also methods for saving and loading a whole workbook: Workbook.Save and Workbook.Load which accept Stream. If you are going to use these methods they are on the IG Excel Library classes which are not visual controls and you should have access to them from the application's view model which should not interfere with the MVVM pattern.

    If you require any further assistance, please do not hesitate to ask.

    Sincerely,
    Radko Kolev
    Senior Software Developer

Children
No Data