The general syntax for the Workbooks.Open method in VB.net to open an excel file is: expression.Open (FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)
.
The fourth parameter is the FORMAT which MSDN documentation says that is to be used when excel opens a text file. I tried opening a text file programmatically but got an error (which was expected). So can someone pls explain the use of the the FORMAT parameter in the syntax above? And is it something that is used frequently when we are programmatically opening excel files??
code used to open text file using excel:
oxl = CreateObject("Excel.Application")
oxl.Visible = True
oxl.Workbooks.Open("G:\Excel Experiments\Test.docx")