Board index » delphi » How to insert new Sheet in Excel

How to insert new Sheet in Excel

How do I insert a new sheet in MS Excel 97?.

Please help me.

Thanks
Jigme

 

Re:How to insert new Sheet in Excel


<<Jigme Wangchuk:
How do I insert a new sheet in MS Excel 97?.

Quote

This inserts one worksheet and calls it 'New':

var
  WS: _Worksheet;
..
  WS := Excel.Worksheets.Add(EmptyParam, EmptyParam,
                 1, xlWorksheet, lcid) as _Worksheet;
  WS.Name := 'New';

--
Deborah Pate (TeamB) http://delphi-jedi.org

  Use Borland servers; TeamB don't see posts via ISPs
  http://www.borland.com/newsgroups/genl_faqs.html

Re:How to insert new Sheet in Excel


Quote
> This inserts one worksheet and calls it 'New':

> var
>   WS: _Worksheet;
> ..
>   WS := Excel.Worksheets.Add(EmptyParam, EmptyParam,
>                  1, xlWorksheet, lcid) as _Worksheet;
>   WS.Name := 'New';

I forgot to mention that I wanted to insert second worksheet.
Does this program inserts second worksheet?.

Thanks for your kind help.
Merry Cristmas

Other Threads