Info

My one complaint with this excellent help system is that it does not identify which parameters may be new to a given version. In this particular case, TrailingMinusNumbers was introduced in Excel 2002. If you attempt to give this program to someone who is still using Excel 2000, the code does not run because it does not understand the TrailingMinusNumbers parameter. This is a frustrating problem, and the only way to learn to handle it is through trial and error.

If you read the help topic on OpenText, you can surmise that it is basically the equivalent of opening a file using the Text Import Wizard. In the first step of the Wizard, you normally choose either Delimited or Fixed Width. You also specify the File Origin and at which row to start (see Figure 2.10). This first step of the Wizard is handled by these parameters of the OpenText method:

Origin:=437 StartRow:=1 DataType:=xlDelimited

Figure 2.10

The first step of the Text Import Wizard in Excel is covered by three parameters of the OpenText method.

Figure 2.10

The first step of the Text Import Wizard in Excel is covered by three parameters of the OpenText method.

Step 2 of the Text to Columns Wizard enables you to specify that your fields are delimited by a comma. We don't want to treat two commas as a single comma, so Treat Consecutive Delimiters As One is unchecked. Sometimes, a field may contain a comma—for example "XYZ, Inc." In this case, the field should have quotes around the value. This is specified in the Text qualifier box (see Figure 2.11). This second step of the Wizard is handled by these parameters of the OpenText method:

TextQualifier:=xlDoubleQuote

ConsecutiveDelimiter:=False

Tab:=False

Semicolon:=False

Comma:=True

Space:=False

Other:=False

Figure 2.11

Step 2 of the Text Import Wizard is handled by the seven parameters of OpenText method.

Text Import Wizard - Stop 2 of 3

Thn screenletsym set Sic deimiers vn r data cccitare. Vol can -a how r**' lea fc flFFeetfldlypifl preview bejow.

DslmltBrs dl lab CH 5Emlmlon Q^mntij □ îpkc □ ither

Q1 Treat cmsecudre dElmliers as ore Teat aualFer: |_

DslmltBrs dl lab CH 5Emlmlon Q^mntij □ îpkc □ ither

Q1 Treat cmsecudre dElmliers as ore Teat aualFer: |_

Data ere view

tiitfüi e-süAte

tnvolc ifJuaJbiar

0 0

Post a comment