donnytian / Npoi.Mapper

Use this tool to import or export data with Excel file. The tool is a convention based mapper between strong typed object and Excel data via NPOI.
MIT License
589 stars 114 forks source link

Method not found: 'Void NPOI.SS.UserModel.IWorkbook.Write(System.IO.Stream)'. #113

Closed aminkosh closed 1 year ago

aminkosh commented 1 year ago

Hi, I have the following code: `

using (var ms = new MemoryStream())
        {
            var mapper = new Mapper()
            {
                HasHeader = true
            };
            mapper.Save(ms, listDtos, "Auditlogs");
         }

`

but on mapper.Save(...) i get this error : Method not found: 'Void NPOI.SS.UserModel.IWorkbook.Write(System.IO.Stream)'.

The error is appeared after i updated the "Npoi.Mapper" Version="3.5.1" to "Npoi.Mapper" Version="4.1.0"

Any help appreciated

bobantopukov commented 1 year ago

Hi,

I've the same issue with "Npoi.Mapper" Version="4.1.0".

Thanks

flkeller commented 1 year ago

If you have installed NPOI manually in version 2.6.0 you have to downgrade to 2.5.6. Afterwards it is working fine. Npoi has changed there Interfaces in the latest minor release

black-and-tan-doge commented 1 year ago

Downgrading NPOI to 2.5.6 fixed the issue for me.

tonyqus commented 1 year ago

@donnytian Can you release a new NPOI.Mapper version based on NPOI 2.6.0?

skovalyova commented 1 year ago

Same happens for me when using NPOI.Mapper 4.1.0

curllion commented 1 year ago

我也遇到这个问题啊,各种版本都试了,一直报这个错