Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default write out formatted text files


Hi everyone

I want to write a procedure in VBA which reads information input by th
user into an Excel worksheet, then manipulate the data, and then finall
write out text files which have my own specified format. In other words
I do not want to write out csv files, or tab delimited files. Instead
want to define the format of the text files myself inside the VB
procedure. Does anyone know how I can do this?

I guess one way of doing this would be to read in the data, manipulat
it, and then create a new worksheet where all my formatted text is i
the first column. Thus when I write out the text file, it won't put an
commas or tabs where I don't want them. But this method seems a bi
tedious, so I'm wondering if you have any other ideas that would mak
the job easier.

Thank you!
E

--
embirat
-----------------------------------------------------------------------
embirath's Profile: http://www.excelforum.com/member.php...fo&userid=3720
View this thread: http://www.excelforum.com/showthread.php?threadid=56917

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default write out formatted text files

If you really want to invent your own file format to store formatting info,
you will need to read/write it to file yourself using the Open statement.
It would probably be better to write a class to do this.

However, there are a number a format available that would save you the
trouble of creating you own; Rich Text Format, HTML, Word.
Depends what you are trying to achieve.

NickHK

"embirath" wrote in
message ...

Hi everyone

I want to write a procedure in VBA which reads information input by the
user into an Excel worksheet, then manipulate the data, and then finally
write out text files which have my own specified format. In other words,
I do not want to write out csv files, or tab delimited files. Instead I
want to define the format of the text files myself inside the VBA
procedure. Does anyone know how I can do this?

I guess one way of doing this would be to read in the data, manipulate
it, and then create a new worksheet where all my formatted text is in
the first column. Thus when I write out the text file, it won't put any
commas or tabs where I don't want them. But this method seems a bit
tedious, so I'm wondering if you have any other ideas that would make
the job easier.

Thank you!
Em


--
embirath
------------------------------------------------------------------------
embirath's Profile:

http://www.excelforum.com/member.php...o&userid=37202
View this thread: http://www.excelforum.com/showthread...hreadid=569171



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default write out formatted text files


Thanks Nick! I will check out the Open statement and see if it can d
what I want.

The files I'm writing out have to be read in by another piece o
software which only reads on particular unique format. So I'm stuc
with creating my own format, unfortunately.

Thanks for your input.
Emm

--
embirat
-----------------------------------------------------------------------
embirath's Profile: http://www.excelforum.com/member.php...fo&userid=3720
View this thread: http://www.excelforum.com/showthread.php?threadid=56917

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default write out formatted text files

Have a look at this http://vb-helper.com/tut5.htm for serialising object.
So you can pass a Range/Characters/TextBox object and your classes reads the
text along with the various formatting info and writes it to a file in the
required format.

NickHK

"embirath" wrote in
message ...

Thanks Nick! I will check out the Open statement and see if it can do
what I want.

The files I'm writing out have to be read in by another piece of
software which only reads on particular unique format. So I'm stuck
with creating my own format, unfortunately.

Thanks for your input.
Emma


--
embirath
------------------------------------------------------------------------
embirath's Profile:

http://www.excelforum.com/member.php...o&userid=37202
View this thread: http://www.excelforum.com/showthread...hreadid=569171



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text in Text-formatted cells changes to ### after the 255th charac wildetudor Excel Discussion (Misc queries) 2 July 30th 09 03:20 PM
CSV formatted files open odly in Excel 2000 Janski Excel Discussion (Misc queries) 3 November 24th 05 07:58 PM
Converting 'General' formatted cells to Text formatted cell using. Zahid Khan Excel Worksheet Functions 1 March 12th 05 07:13 PM
Emailing Web Archive Formatted (non-interactive) Excel files.... Mark[_33_] Excel Programming 0 January 22nd 04 06:16 AM
Read/Write data to/from text files from a spreadsheet. lothario[_37_] Excel Programming 8 November 2nd 03 03:10 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"