473,398 Members | 2,088 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,398 software developers and data experts.

How to programming Excel

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
' Macro recorded 10/6/2003 by WEIMIN ZHANG
'

'
Workbooks.OpenText
Filename:="C:\MMS\BatchPrint\dave.txt", Origin:=437, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=False, Comma:=True _
, Space:=False, Other:=False, FieldInfo:=Array
(Array(1, 1), Array(2, 1), _
Array(3, 1), Array(4, 1), Array(5, 1), Array(6,
1), Array(7, 1), Array(8, 1), Array(9, 1)), _
TrailingMinusNumbers:=True
ChDir "C:\MMS\BatchPrint"
ActiveWorkbook.SaveAs
Filename:="C:\MMS\BatchPrint\dave.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub

Nov 15 '05 #1
0 1159

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

Similar topics

0
by: T HOWE | last post by:
I know how to use "AxWebBrowser" to display MS Word or MS Excel win in a sub control in my Windows Forms application! I know how to use “Excel.Application” or “Word.Application” along with...
0
by: Aaron Prohaska | last post by:
I need to write a program in .net csharp to write to an open Excel 2000 instance and need of some help. Is it possible to open an excel file then get a reference to the running process using...
4
by: ibeetb | last post by:
My head is exploding with the 500 different ways shown on Microsoft's site to program Excel (Office) Can anyone offer the best solution to the following: I want to program a couple of Excel...
1
by: Aiysha | last post by:
Hi, I want to take cotrol of notepad from excel (through VB programming). I have .prn files which have to opened in notepad and then I have to save these .prn files in .sim , all files format. ...
6
by: Luke Vogel | last post by:
Hi all ... could someone point me in the right direction for programming office applications (specifically excel) using vb.net? Can vb.net replace or enhance VBA that comes with the office suite?...
1
by: lanem | last post by:
I am trying to create an excel spreadsheet from my asp.net(vb.net) page. I can do this, but I just cannot find much documentation or code samples online. There is some for very common tasks, but...
10
by: Omar | last post by:
I'm looking for a programming language or module that sorta looks and feels like MS Excel (I love and think in tables), yet has the power and open-endedness of python or javascript. I'm still...
0
by: six888 | last post by:
i need to make a report using excel. im given a few data in excel document for a 1 month report (1 document for each week). each data document have a few work sheet.i need only certain information in...
3
by: meetshashank | last post by:
I am learning Perl programming. I need to learn Perl programmimg for following pupose in my project : My project is having Sybase databse on Unix box. I need to get data from database from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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 projectplanning, coding, testing,...
0
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...

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.