Parameters / Excel

Hello everybody! I am trying to import a tekstfile into excel, from Navision. To do thgis, I use the Microsoft Excel 9.0 Object Library. To import the the textfile correctly, I use the method ‘OpenText’. In Visual Basic you can(must) send a lot of Variants as parameters. But this time I do not want to use VB. So my question is: how do I send the proper parameters to Excel??? It’s about the following line: xlWorkbooks.OpenText(FileName,?,1,?,1,?,?,?,?,?,?,?,?,?,?,?); In the MSDN Library I found the following description, which doesn’t really help me: Sub OpenText(Filename As String, [Origin], [StartRow], [DataType], [TextQualifier As XlTextQualifier = xlTextQualifierDoubleQuote], [ConsecutiveDelimiter], [Tab], [Semicolon], [Comma], [Space], [Other], [OtherChar], [FieldInfo], [TextVisualLayout], [DecimalSeparator], [ThousandsSeparator]) Has anyone used thisone before? Anolis Sittard Netherlands

Hmmm, just found out myself. For the record, the following parameters work: xlWorkbooks.OpenText(FileName,1,1,1,1,1,0,0,1); Anolis Sittard Netherlands

Open the compressed Help Vbaxl9.chm which comes with Office 2000. Look in Book: Microsoft Excel Visual Basic Reference → Methods → M - O - OpenText Method BTW: Only the first Parameter (the filename) is mandatory. You can omit the rest of the parameters if you can live with the default values. Marcus Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch