473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Excel Macro: Workbooks.OpenText 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.OpenText(Filename:="C:\SMT\SMT.TXT",
Origin:=Excel.XlPlatform.xlWindows, StartRow _
:=1, DataType:=Excel.XlTextParsingType.xlDelimited,
TextQualifier:=Excel.XlTextQualifier.xlTextQualifi erNone,
ConsecutiveDelimiter _
:=False, TAB:=True, Semicolon:=False, Comma:=False, Space:=False, _
Other:=False, FieldInfo:=Array(Array(1, 2), Array(2, 2), Array(3, 1),
Array(4,2),Array(5, 2)))
Nov 21 '05 #1
0 5916

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

Similar topics

2
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...
0
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...
8
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...
0
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...
2
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...
2
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...
4
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...
6
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...
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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,...

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.