none
How to change pivot filter in c# RRS feed

  • Question

  • Hi ,

    I'm new a developer.

    I have a procdure in SQL server database. I use excel query(connection only) to get data from the procdure. 

    In the excel I use pivot table to show query's data and I have a filter "Filter_Month" the data like '2019-05','2019-06','2019-07','2019-08'. 

    Now I use "Microsoft.Office.Interop.Excel" and below code to refresh data. but I don't know how to change "Filter_Month" to show current month.

                    Workbook eBook = ExcelObj.Workbooks.Open(AttachFile);
                    eBook.Activate();
                    eBook.RefreshAll();
    Wednesday, August 7, 2019 8:24 AM