Learn to use Excel.Application in VB.NET

xiaoxiao2021-03-06  44

Remember this first, in the study: D

The following is a code segment that initial test success

DIM EF As New Excel.Application

DIM ES As New Excel.Worksheet

Dim Er as Excel.Range

ef.workbooks.add ()

ES = EF.Worksheets ("Sheet1")

Es.activate ()

Er = es.Range ("A1: C1")

Er.select ()

Er.Merge ()

Er.Value = "Jiangyin Seamless Demonstration"

Ef.visible = true '2005-2-25 Get the expected effect

'In general, three objects are currently applied: Application, Worksheet and Range, the relationship between the three should be clear, do this, you can start from the basics :)

2005-2-26

Continue yesterday's format setting problem today

It was found that the format settings were in the Range object, but only the two properties of the VerticalAlignment and HorizontalaLignment were set on the setting alignment properties.

Of course, Worksheet is available on the non-page settings.

Es.pagesetup.centerfooter = "Don't know"

This test has not passed

转载请注明原文地址:https://www.9cbs.com/read-53801.html

New Post(0)