473,725 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excel Macro: Workbooks.OpenT ext FieldInfo: Array problem in VB.Ne

Hi,
I can able to run the Excel Macro command in VB6. Unfortunately , VB.Net
always prompt Array - no declaring. I've insert the Excel references, and it
is still not working. Can anyone help me ? Thanks.

Source code:-
xl.Workbooks.Op enText(Filename :="C:\SMT\SMT.T XT",
Origin:=Excel.X lPlatform.xlWin dows, StartRow _
:=1, DataType:=Excel .XlTextParsingT ype.xlDelimited ,
TextQualifier:= Excel.XlTextQua lifier.xlTextQu alifierNone,
ConsecutiveDeli miter _
:=False, TAB:=True, Semicolon:=Fals e, Comma:=False, Space:=False, _
Other:=False, FieldInfo:=Arra y(Array(1, 2), Array(2, 2), Array(3, 1),
Array(4,2),Arra y(5, 2)))
Nov 21 '05 #1
0 5940

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5327
by: Don | last post by:
Within an application that I am writing, I am trying to allow the user to select a text (.txt) file from the Open File dialog box in Excel. This is working. The problem is, I want to eliminate the user from having to go through the 3-step Text Import Wizard, which appears right after user selects the (.txt) file from the Open File dialog box. I want to suppress this Wizard from appearing and do that work behind the scenes in the programming....
0
1189
by: Przemek Wrzesiñski | last post by:
Hi, i'm trying to code my first add-in, which should open file selected by user (txt file, space delimited), do some formatting, calculation and pivot table at the end. My problem is, that I can't see opened workbook. Here is my code: Public Class Connect Dim applicationObject as Object //creating toolbar with buttons, it's all right, button click event calls //sub Lista
8
3371
by: mytfein | last post by:
Hi Everyone, Background: Another department intends to ftp a .txt file from the mainframe, for me to process. The objective is to write a vb script that would be scheduled to run daily to process this .txt file. Goal: I am working on a vba script to:
0
1169
by: Weimin Zhang | last post by:
Hi, following is the VBA code generated by Macro in Excel XP (2002). What I would like to do is to incorporate the same thing into C#, but I don't know how to pass the Array () to C# in the Workbooks.OpenText() method. Can anyone please help me on how to pass these parameters for this method in C#? Thanks a lot! Sub WMTest() ' ' WMTest Macro
2
9634
by: Lee | last post by:
I have been trying for *many* hours to figure out how to use the OpenText method in Excel. I have a data file in text format (ASCII) and I want to import this data into an Excel worksheet using space delimiting. In other words, there are spaces between the data. Please refer to the following code: Dim app As Excel.Application Dim book As Excel.Workbook Dim sheet As Excel.Worksheet
2
10352
by: Jacob.Bruxer | last post by:
Hi everyone, I'm having trouble opening space delimited textfiles in Excel from Visual Basic.net. I'm able to control, open and modify Excel files from Visual Basic, so my Excel reference seems to be working ok. I just don't know what I'm doing when I try to open a space delimited file and want to put the data into columns. I tried recording a macro in VBA and going from there, but then I got stuff saying "Name 'xlDelimited' is not...
4
7951
by: michael.pearmain | last post by:
Hi Experts, Looking for a very quick bit on of advice on how to make some python code run. I'm a newbie to both VBA and Python, so i apologise if this is very easy but i'm about to tear my hair out after googling for the last 3 days. I have written a large python script which inside of it creates an Excel table, the name of this file and how many objects can change for each project i run.
6
6674
by: AleydisGP | last post by:
I have a .plt file (which is a tab delimited ASCII file) and I want to format it to get a .dbf with data in rows and columns, detele some rows/columns and substitute decimal '.' with ','. All this using Python (I'm using Pythonwin). The .plt file looks like this: * ISCST3 (02035): Tersa * MODELING OPTIONS USED: * CONC URBAN ELEV DFAULT
0
1081
by: jalo | last post by:
I need help with this Macro. At the moment I can only use it for the one day specified ie the 1508 but need it to pick up the previous business day. Don't know if there is a simple remedy for this or if a more complex macro is needed. Any help greatly appreciated. ChDir "L:\ftpin\cdsftp\SWAPS" Workbooks.OpenText FileName:="L:\ftpin\cdsftp\SWAPS\audtrail.FAI.1508.txt", _ origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited,...
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.