I have a program which uses a DLL called spreadsheetgear.dll
In Visual Studio C# I do the following:
Reference the spreadsheetgear.dll
SpreadsheetGear.IWorkbook workbook1 =
SpreadsheetGear.Factory.GetWorkbook("C:\text.xls");
This works fine in C# with Visual Studio
In Powershell, I create the analogous logic by:
Add-Type -Path "C:\spreadsheetgear.dll"
$workbook1 = New-Object SpreadsheetGear.Factory.GetWorkbook("c:\test.xls")
However Powershell gives me an error saying .... New-Object : Cannot find type [SpreadsheetGear.Factory.GetWorkbook]: make sure the assembly containing this type is loaded.
What am I doing wrong ... please assist.
Thank you.