Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Opening and saving textfile into XLS

Hey reader,

I'm trying to make a chart of a few txt files.
I can open the txt files using:
logtext = InputBox("Give the name of the file to add", "Name of the
LogFile")
logfile = ThisWorkbook.Path & "\" & logtext & ".txt"
Workbooks.OpenText FileName:=logfile, _
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited,
TextQualifier:= _
xlNone, ConsecutiveDelimiter:=True, Tab:=False, Semicolon:=False
_
, Comma:=False, Space:=True, Other:=False, OtherChar:=False

but that opens the txt file and them puts everything in the right
colums and rows. But now I want to save it as an .xls

I tried using thisworkbook.save(path of the file)
but then I saved the file where the button is standing to read the
log...
any ideas?

And one more thing, how do I use the data in the txtfile to make a
chart?
Thx in advance
micmast
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Opening and saving textfile into XLS

thisworkbook.save "C:\my path\logtext.xls", xlWorkbookNormal

Turn on the macro recorder and create your graph manually. That should give
you a good start.

Regards,
Tom Ogilvy


"MicMast" wrote in message
om...
Hey reader,

I'm trying to make a chart of a few txt files.
I can open the txt files using:
logtext = InputBox("Give the name of the file to add", "Name of the
LogFile")
logfile = ThisWorkbook.Path & "\" & logtext & ".txt"
Workbooks.OpenText FileName:=logfile, _
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited,
TextQualifier:= _
xlNone, ConsecutiveDelimiter:=True, Tab:=False, Semicolon:=False
_
, Comma:=False, Space:=True, Other:=False, OtherChar:=False

but that opens the txt file and them puts everything in the right
colums and rows. But now I want to save it as an .xls

I tried using thisworkbook.save(path of the file)
but then I saved the file where the button is standing to read the
log...
any ideas?

And one more thing, how do I use the data in the txtfile to make a
chart?
Thx in advance
micmast



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
opening and saving a workbook Chelsea_BOO17 Excel Discussion (Misc queries) 1 October 24th 07 07:11 PM
Default folder for opening/saving files Dino Excel Discussion (Misc queries) 2 July 5th 07 11:28 PM
Workbook slow opening & saving Phil Spears Excel Discussion (Misc queries) 1 June 21st 06 06:02 PM
WHEN DOWNLOADING A TEXTFILE EXCEL DELETES BLANK ROWS - STOP THIS? shell3 Excel Worksheet Functions 0 October 21st 05 03:29 PM
Excel VBA to access URL as Textfile Günter Kehrer Excel Programming 1 August 3rd 03 07:54 PM


All times are GMT +1. The time now is 03:20 AM.

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"