Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default convert CSV to XLS format using command

Dave,

That solution is fantastic and does exactly what I had hoped to do without any third party software. Thank you very much!

On Monday, July 21, 2003 7:17:26 PM UTC-5, Dave Peterson wrote:
It looks like you want to use a .vbs (scripting) and Dan wants to use a VBA
macro.

If you really want to use a VBS script, then maybe something like this will get
you started:

Dim myXL
Set myXL = CreateObject("excel.application")

myXL.workbooks.Open "c:\my documents\excel\book1.csv"

myxl.displayalerts = false
myXL.activeworkbook.SaveAs "c:\my documents\excel\book1.xls", -4143
myxl.displayalerts = true

myXL.activeworkbook.Close False

Set myXL = Nothing



copy this to notepad and save it as something.VBS. (and fix the
filenames/location).

But this actually opens excel (hidden, but open), opens the .csv, saves it as
.xls and then closes excel.


kris wrote:

Hi,

I need to convert .CSV file to XLS with out opening excel
2000. I want to do it thru command prompt or vb script.
Can some one help in this regard? any script/ command for
this?

Thanks


--

Dave Peterson

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
from date format convert to text format is wrong nooris Excel Discussion (Misc queries) 2 February 4th 10 03:41 PM
Macro to convert mmddyyyy format into mm/dd/yyyy format maijiuli Excel Programming 2 March 10th 08 11:58 PM
Convert numbers from text format to number format merlin68 Excel Discussion (Misc queries) 7 June 20th 07 07:03 PM
How can I convert a date format to an ISO week format (in EXCEL)? ELI Excel Discussion (Misc queries) 2 July 6th 05 06:31 PM
How do i convert excel to csv in command line? ( not save as) F1 Excel Discussion (Misc queries) 1 June 1st 05 03:51 AM


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

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

About Us

"It's about Microsoft Excel"