This project has moved. For the latest updates, please go here.

Range names are lost on save

May 24, 2013 at 8:18 PM
Hi All,

EPPlus was a great help for me. I have created my application around it. Now I am having problem and kind of stuck.

I have a big xlsm files having a lots of macros and data validations. When I load the file like this
        ExcelPackage xlsFile = new ExcelPackage();
        var file = File.Open(fullFileName, FileMode.OpenOrCreate);
        xlsFile.Load(file);
macros and everything works well.

But when I open the file like this
        FileInfo fileInfoObj = new FileInfo(fullFileName);
        ExcelPackage xlsFile = new ExcelPackage(fileInfoObj);
Make a little change in a Cell and save. xlsFile.Save();

My Range Names are deleted. Thought I didn't touch any macro or Range Name.

Thanks for your help.
Riz