Deleting rows and columns

Nov 10, 2016 at 5:11 PM

Is it possible to delete unwanted rows and columns from a file using this library?

Nov 16, 2016 at 5:36 AM

The library doesn't provide the functionality itself but here is my solution proposal :

According to what I understand, you could, do an Import-OOXML to import your excel sheet, then create a new array of object filtered on column name and "date" (Select-Object, Where-Object), then do an Export-OOXML to export your array of newly created/filtered objects to an new or the same XLSX.
Marked as answer by Avalon77 on 11/15/2016 at 10:37 PM
Nov 16, 2016 at 2:16 PM
Thanks for the help. I'm having problems getting it to work though. No doubt it'll be me doing something wrong, but any advice would be much appreciated.

I've copied the library over and imported it into PS using Import-Module, but when I try and run an Import-OOXML command I get this error:-

Cannot find type [OfficeOpenXml.ExcelPackage]: make sure the assembly containing this type is loaded.

I tried googling it, but it wasn't a great help.
Nov 18, 2016 at 7:15 AM
The EPPLUS.DLL must be located where the module reside. EPPLUS.DLL is part of the package.

Could you tell me more about your problem ? Powershell version, .Net version, Module location and maybe a example code.

Thanks !