Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Issue: Cannot Save() after SaveAs() on new created files [8440]

$
0
0
If a new workbook is created and saved with SaveAs(), it should be possible to use Save().

An exception is thrown at line 408 of XLWorkbook.cs

if (_loadSource == XLLoadSource.New)
throw new Exception("This is a new file, please use one of the SaveAs methods.");

When saved with SaveAs() the loadsource should change to file.
Comments: ** Comment from web user: WPFUserKMI **

I am facing the problem with the following

var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "Hello World!";
workbook.SaveAs(@"C:\");
it throws the exception at saveas, no matter what address i have been given there, please help it is just the start?

Delay in reply is great loss at my project end, please reply my both the posts?


Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>