ActiveXObject("Excel.Application") in Edge
Texas43
1
Reputation point
I have to map an old web application to work on MS Edge. One of the issues we found is that it has a script to open some data in Excel using ActiveXControl. Since this is deprecated in Edge, I would like to understand how is that handle now? What Library should we be using?
Here is a snippet of what we are converting:
m_xlApp = new ActiveXObject("Excel.Application");
m_xlApp.DisplayAlerts = true;
m_xlApp.Visible = true;
var xlWorkBook = m_xlApp.Workbooks.Open(sFileName);
xlWorkBook.Worksheets(1).PageSetup.Orientation = 2;
xlWorkBook.Worksheets(1).PageSetup.FitToPagesWide = 1;
xlWorkBook.Worksheets(1).PageSetup.FitToPagesTall = 1;
var objRange = xlWorkBook.Worksheets(1).UsedRange