We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problems with WPF using Aspose.Cells.GridDesktop

I need to use Aspose.Cells.GridDesktop in the WPF interface.
I used WindowsFormsHost to place the GridDesktop.
The GridDesktop opens the Excel file and modifies the data on the interface.
There are two questions:
1: the modified results cannot be seen on the interface.
2: when I output the GridDesktop to the Excel file, I find that the data has been modified, but the l file is filtered.
The code is attached.
Please help me to see the results of the changes in the interface after the interface is modified, and output to the file without default filter.
Thank you very much.WpfApp.zip (29.0 KB)

@Diego2020,

Thanks for the sample project and template file.

After an initial test, I am able to reproduce your both issues when using your sample project with latest Aspose.Cells.GridDesktop v20.4. I even tried to add the following lines of code to cope with first issue but to no avail:

_GridDesktop.Refresh();
_GridDesktop.RefreshControl();

I have logged a ticket with an id “CELLSNET-47295” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Thank you very much.

@Diego2020,

Please try the following code and let us know your feedback:
e.g
Sample code:

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            GridAct();
        }

        private void GridAct()
        {
            string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "book1.xlsx");
            _GridDesktop.ImportExcelFile(path);
             //use event trigger call back
            _GridDesktop.FinishLoadFile += doGridWork;
        }

        private void doGridWork(object sender, WorkBookEvents args)
        {

            if (args == WorkBookEvents.LoadFinish)
            {
                GridCell gridCell = _GridDesktop.Worksheets[_GridDesktop.Worksheets.ActiveSheetIndex].Cells[0, 0];
                gridCell.SetCellValue("A1 SetCellValue");

                gridCell = _GridDesktop.Worksheets[_GridDesktop.Worksheets.ActiveSheetIndex].Cells[0, 1];
                gridCell.Value = "A2 Value";

                gridCell = _GridDesktop.Worksheets[_GridDesktop.Worksheets.ActiveSheetIndex].Cells[0, 2];
                gridCell.Formula = "A1";

               //trigger to show formula result
                _GridDesktop.RunAllFormulas();
               string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "book2.xlsx");
                _GridDesktop.ExportExcelFile(path);
              //  this.gridDesktop1.Worksheets[this.gridDesktop1.ActiveSheetIndex].DisplayRightToLeft = true;
              //  DoEvents();

            }
        }

Thank you very much.

@Diego2020,
You are welcome.