Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm programing in visual basic.net and I need to convert
a excel spred sheet file into a text file(tab delimited) and back again. Does anyone know how I could do this. I assume there is a class that will make it easy but I can't seem to find it. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you have room/time to save the file during the macro
you could do it like this: Private Sub ToTextNBackAgain() ActiveWorkbook.SaveAs Filename:= _ "C:\ExcelFileAtStart.txt", FileFormat:= _ xlText, CreateBackup:=False 'at this point the file has been converted to text ActiveWorkbook.SaveAs Filename:= _ "C:\ExcelFileAtStart.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False 'at this point the file has been converted back to an Excel End Sub -IA -----Original Message----- I'm programing in visual basic.net and I need to convert a excel spred sheet file into a text file(tab delimited) and back again. Does anyone know how I could do this. I assume there is a class that will make it easy but I can't seem to find it. Thanks. . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ryan,
When you are in Visual Studio .Net open your project then goto ProjectAdd Reference. Then click on the COM tab. Scroll do to Microsoft Excel (version number) Object Library and click on it to highlight it. Then click on the Select button. Then click the Ok button. The Excel object module will now be available to you in Visual Studio. You should be able to now manipulate Excel from Visual Basic. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
converting excel 2003 to 2007 file formats | Excel Discussion (Misc queries) | |||
Converting date formats | Excel Discussion (Misc queries) | |||
Converting file formats into .xls files | Excel Discussion (Misc queries) | |||
Help with converting date formats | Excel Worksheet Functions | |||
Converting date formats | Excel Discussion (Misc queries) |