Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If you run this "code" ... All sheets are deleted of the open document and if you want to work with it you must delete the file QVF
MessageBox.Show(" CreateSheet Sheet2 ");
ISheet mySheet = application.CreateSheet("Sheet2");
if (mySheet != null)
{
try
{
mySheet.Properties.MetaDef.Title = "Sheet2";
mySheet.Properties.Rank = 2;
}
catch (Exception)
{
MessageBox.Show("error to create sheet");
throw;
}
}
Hi,
Your sheets are not deleted, but your application will not open in the client unless you set the title on the sheets. to be able to set the title you must call Suspend / Resume layout.
mySheet.SuspendLayout();
mySheet.Properties.MetaDef.Title = "Sheet2";
mySheet.Properties.Rank = 2;
mySheet.ResumeLayout();
Or set the properties when creating the sheet like this:
ISheet mySheet = application.CreateSheet("Sheet2",
new SheetProperties { Rank = 0, MetaDef = new SheetMetaDataDef { Title="My sheet" } });
Best regards
Lars-Göran Book
ok now works!! but also you must to write it in your pages to help.
thanks corchi