VSTO & .NET & Excel

October 27, 2011

Axialis Stock Icons For Toolbar & Ribbon

Filed under: .NET & Excel, Excel, UI Design — Dennis M Wallentin @ 5:43 pm

I’m the first to admit that I have moved forward and backward when it comes to stock icons and which icons to use. The UI plays a critical role in all kind of softwares which means that we also need to consider what kind of icons to be used. With the introduction of Ribbon UI I would say that the design has become even more important. It requires a larger area of the hosted Windows.

When I design UIs I try to put myself in the role of an end user who spends a considerable time with my solutions in Excel. Some cool UI design is no longer cool after two weeks use where the user spends perhaps 10-15 hours during that period using the solution.

However I cannot say that I’m well educated when it comes to design. I try to follow Microsoft’s concept for designing Ribbon UIs.

The following screen shot shows examples of the new stock icons from Axialis who has recently started out to offer complete icons sets. Yes, it’s the same company who also offers the great icon creator tool, IconWorkshop.


Personally I prefer light-weighted colored icons with a soft tone and that is also what the new icon set, Axialis Ribbon & Toolbar Stock Icons, offers. What we get is an improved professional UI.

It’s easy to forget that in VS.NET we cannot use resource files that have names like “aaa bbb.ping”. So if we use let say 16 icon files we need to rename them all before using them. Axialis has managed to keep that in mind and therefore all icon files have names like “aaa_bbb.ping”.

This is what Axialis writes about the new released icons:/
Icons are available in sizes 16×16, 24×24, 32×32, 48×48 and normal, hot & disabled states. Provided file formats are PNG, ICO and BMP. Colors are coded in RGB with alpha channel transparency in PNG and ICO icons. BMP icons are coded in RGB with magenta areas to define transparency.

For more information please visit one of the links. I also recommend visiting their homepage on a more regular basis as they plan to release more stock icons sets.

Kind regards,
Dennis

October 14, 2011

Articles about VB.NET & Excel

Filed under: .NET & Excel — Dennis M Wallentin @ 6:24 pm

This is an announcement that Siddhard Route (MVP VB.NET) is publishing articles about VB.NET and Excel on a regular basis on his blog.

The articles cover several areas on how to manipulate Excel through automation.

For more information please see: VB.NET and Excel

Enjoy!

Kind regards,
Dennis

October 6, 2011

Evaluate Sheet Types & Copy Sheets with VB

Filed under: .NET & Excel, Excel — Dennis M Wallentin @ 2:47 pm

This post demonstrate how we can evaluate sheet types and how to copy sheets with VB. In other words, no rocket science.

The following procedure is only for demonstration purpose. It shows how easy it is to evaluate what sheet types we have. It also demonstrate how to dimension an object array and how to populate it at run time.

Bear in mind that Excel assume the sheet’s name to copy is part of an object array.

Private Sub btnCopy_Sheets_Click(sender As System.Object, _
e As System.EventArgs) _
Handles btnCopy_Sheets.Click

Const Path As String = _
"c:\Users\Dennis Wallentin\Documents\Data\"

Dim wbObject As Excel.Workbook = Nothing

Dim oSheetName(0) As Object

Dim xlApp As Excel.Application = New Excel.Application

Dim wbTarget As Excel.Workbook = _
xlApp.Workbooks.Open(Path + "Target.xlsx")

With xlApp
.Workbooks.Open(Path + "DT1.xlsx")
.Workbooks.Open(Path + "DT2.xlsx")
End With

For Each wbObject In xlApp.Workbooks

If Not wbObject.Name = wbTarget.Name Then

'Check type of sheet.
If TypeOf (wbObject.Sheets(1)) Is Excel.Worksheet Then

Dim wks As Excel.Worksheet = _
CType(wbObject.Worksheets(1), Excel.Worksheet)

'Add value to the one-dimensional object array.
oSheetName.SetValue(wks.Name.ToString(), 0)

'Just to show the Excel.Chart sheet type.
ElseIf TypeOf (wbObject.Sheets(1)) Is Excel.Chart Then

Dim chs As Excel.Chart = CType(wbObject.Sheets(1), Excel.Chart)

'Add value to the one-dimensional object array.
oSheetName.SetValue(chs.Name.ToString(), 0)

End If

wbObject.Sheets(oSheetName).Copy(After:= _
wbTarget.Sheets(wbTarget.Sheets.Count))

wbObject.Close(SaveChanges:=False)

End If

Next

With xlApp
.Visible = True
.UserControl = True
End With

'Don't forget to clean up properly.

End Sub

Kind regards.
Dennis

Create a free website or blog at WordPress.com.