When I put certain contents into a cell and then call workbook.Save, I get an out of range error:
cell.PutValue("\n1. Evgeny\n\n2. Eugene\n\n3. Zhenya\n\n4. EZ\n\n• Hoenle\n");
cell.Characters(23, 3).Font.IsItalic = true;
cell.Characters(23, 28).Font.Size = 12;
cell.Characters(23, 2).Font.Name = "Calibri";
workbook.Save(@"C:\TestChanged3.xls");
Also, when I run these lines, I do NOT get an error, and would think that I might, since the characters I'm formatting go beyond the string length in the cell:
cell.PutValue("\n1. Evgeny\n\n2. Eugene\n\n3. Zhenya\n\n4. EZ\n\n• Hoenle\n");
cell.Characters(23, 100).Font.Name = "Calibri";
workbook.Save(@"C:\TestChanged3.xls");
This is a big issue - an error thrown at the time of setting the cell's Font would not be ideal, but at least - I could catch it and just skip to the next setting - but an error thrown on workbook.Save doesn't tell me what's wrong with the workbook, so it's really tough to handle in my application.
Thanks for your help!