Automating formatting of Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone help me?

I am using VB.NET to output data to an Excel 2002 spreadsheet, this works fine.
I would like to know how to change the sheet names and output to a named worksheet and add/remove a named worksheet
Also if possible I would like to subtotal the data on the worksheet.

I can do all this in VBA but for the life of me can't do it in VB, please help.
 
* "=?Utf-8?B?QmFncHVzcw==?= said:
I am using VB.NET to output data to an Excel 2002 spreadsheet, this works fine.
I would like to know how to change the sheet names and output to a named worksheet and add/remove a named worksheet
Also if possible I would like to subtotal the data on the worksheet.

I can do all this in VBA but for the life of me can't do it in VB, please help.

I doubt that there is a big difference between how to do that in VBA and
via Excel automation. How would you have done it in VBA?
 
Thanks for the quick response.

My VBA code looks lik this;

Sheets("Sheet1").Select
Selection.Subtotal GroupBy:=4, Function:=xlSum, TotalList:=Array(6, 7), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2

How can I get VB to do this for me?
 
Back
Top