I create a workbook from scratch and run wb.save(filename).
The program just sits there I hit the pause button in VS2010 and that line is highlighted. Does not error out.
This used to work the only thing I can think of that change are two things upgraded to 10.1.10101.2018,second is I am now running office 2010.
Any ideas?
Thanks Rick
Hi Rick,
Can you provide us a sample reproducing the issue?
I have tested with 10.1 and couldn't reproduce it with Office 2007 and also with Office 2010 installed.
Sincerely,
Horen Kirazyan
So I did a very simple xls workbook:
public static class test { public static void excel() { String filename = @"c:\Test\test.xls"; Workbook wb = new Workbook(WorkbookFormat.Excel97To2003); Worksheet ws = wb.Worksheets.Add("test"); ws.Rows[0].Cells[0].Value = "testing"; ws.Rows[0].Cells[1].Value = DateTime.Now; wb.Save(filename); } }
this worked. So I am going to start commenting out parts of my code to figure if it is the creation of the rows and cells. I attached the class, this used to work, I made no changes.
I'm glad that you found the problem :)
After stepping through code I found that my function to create the formula string for a cell was all messed up. Fix the function and now saves. Weird how it worked before, but if it wasn't for the save function failing I would have never found my bug.
Anyways, thanks for your help. I apologize for the time you wasted. It was not your control, but my code that was the issue.
Thanks