Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to programming Excel in C#
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how i can do programming in MS Excel.? | Excel Worksheet Functions | |||
Excel/VBA programming | Excel Discussion (Misc queries) | |||
Excel Programming help | Excel Worksheet Functions | |||
Excel Programming | Excel Programming | |||
Excel Programming in VB | Excel Programming |