?
Solved

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

Posted on 2007-03-21
4
Medium Priority
?
804 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

800 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