[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Converting a .CSV format to a 97-2003 .XLS format

Posted on 2007-03-21
4
Medium Priority
?
805 Views
Last Modified: 2011-09-20
Is there a VB script where i can take a .csv file and convert it to a MS Excel 97-2003 .xls format?  I want to automate the process of opening a .csv file in Excel, doing the save as, selecting "Microsoft Excel 97-Excel 2003 &5.0/95 Workbook (*.xls)" and saving.  Is this possible?
0
Comment
Question by:rortiz77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 500 total points
ID: 18767460
dim oEx
set oEx=Createobject("Excel.Application")
oEx.Workbooks.Open "C:\Test\Book1.csv"
oEx.ActiveWorkbook.SaveAs "C:\Test\Book1csv.xls", -4143, , , False, False
oEx.Quit
0
 

Author Comment

by:rortiz77
ID: 18770833
Samopal....your a rock star!!! Thanks  B^)
0
 

Author Comment

by:rortiz77
ID: 18770925
Hmmm...don't supposed you have another trick up your sleeve.  The sever doesn't have MS-Excel installed so it can't find the needed files.  I get error:

"ActiveX component Can't create object: 'Excel.Application'
Code: 800A01AD
Source: Microsoft VBScript runtime error"
0
 
LVL 9

Expert Comment

by:samopal
ID: 18773459
If you want to convert your file to Excel, you should have Excel installed - I cannot see any other way.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question