Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Everybody,
Now I have a problem about the format changes. I have a document i Excel, and I want to change the excel file to text file. For instance in excel, the value in Cells(1,A)=5, Cells(1,B)=6 I want the file in text is like: 56. But generally, when I transfer th file, I find that in text it is 5 6. There is a space between 5 and 6 How can I delete the space? Thank you -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Public Sub NullSV() Dim myRecord As Range Dim myField As Range Dim sOut As String Open "Test.txt" For Output As #1 For Each myRecord In Range("A1:A" & _ Range("A" & Rows.Count).End(xlUp).Row) With myRecord For Each myField In Range(.Cells, _ Cells(.Row, Columns.Count).End(xlToLeft)) sOut = sOut & myField.Text Next myField Print #1, sOut sOut = Empty End With Next myRecord Close #1 End Sub In article , Together wrote: Hi, Everybody, Now I have a problem about the format changes. I have a document in Excel, and I want to change the excel file to text file. For instance, in excel, the value in Cells(1,A)=5, Cells(1,B)=6 I want the file in text is like: 56. But generally, when I transfer the file, I find that in text it is 5 6. There is a space between 5 and 6. How can I delete the space? Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Date Format to Specific Text Format When Copying | Excel Discussion (Misc queries) | |||
Change number (in text format) to numeric format | Excel Discussion (Misc queries) | |||
How to change text format .126 to number format 0.126 ? | Excel Worksheet Functions | |||
How do i change numbers in text format to number format? | New Users to Excel | |||
Change date format to text format | Excel Programming |