Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text in Text-formatted cells changes to ### after the 255th charac | Excel Discussion (Misc queries) | |||
CSV formatted files open odly in Excel 2000 | Excel Discussion (Misc queries) | |||
Converting 'General' formatted cells to Text formatted cell using. | Excel Worksheet Functions | |||
Emailing Web Archive Formatted (non-interactive) Excel files.... | Excel Programming | |||
Read/Write data to/from text files from a spreadsheet. | Excel Programming |